aboutsummaryrefslogtreecommitdiff
path: root/src/backend/catalog/storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/catalog/storage.c')
-rw-r--r--src/backend/catalog/storage.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/catalog/storage.c b/src/backend/catalog/storage.c
index 5a6324fec4c..5c76e7a39ba 100644
--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -266,8 +266,8 @@ RelationTruncate(Relation rel, BlockNumber nblocks)
* the blocks to not exist on disk at all, but not for them to have the
* wrong contents.
*/
- Assert((MyPgXact->delayChkpt & DELAY_CHKPT_COMPLETE) == 0);
- MyPgXact->delayChkpt |= DELAY_CHKPT_COMPLETE;
+ Assert(!MyProc->delayChkptEnd);
+ MyProc->delayChkptEnd = true;
/*
* We WAL-log the truncation before actually truncating, which means
@@ -315,7 +315,7 @@ RelationTruncate(Relation rel, BlockNumber nblocks)
smgrtruncate(rel->rd_smgr, MAIN_FORKNUM, nblocks);
/* We've done all the critical work, so checkpoints are OK now. */
- MyPgXact->delayChkpt &= ~DELAY_CHKPT_COMPLETE;
+ MyProc->delayChkptEnd = false;
}
/*