Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit a26b153

Browse files
committed
Fix truncation of global temp tables
1 parent 964ca6b commit a26b153

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/commands/tablecmds.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,8 @@ ExecuteTruncateGuts(List *explicit_rels, List *relids, List *relids_logged,
17731773
* table or the current physical file to be thrown away anyway.
17741774
*/
17751775
if (rel->rd_createSubid == mySubid ||
1776-
rel->rd_newRelfilenodeSubid == mySubid)
1776+
rel->rd_newRelfilenodeSubid == mySubid ||
1777+
rel->rd_rel->relpersistence == RELPERSISTENCE_SESSION)
17771778
{
17781779
/* Immediate, non-rollbackable truncation is OK */
17791780
heap_truncate_one_rel(rel);

0 commit comments

Comments
 (0)