mirror of
https://github.com/postgres/postgres.git
synced 2025-11-24 00:23:06 +03:00
Rename delayChkpt to delayChkptFlags.
Before commit 412ad7a556, delayChkpt
was a Boolean. Now it's an integer. Extensions using it need to be
appropriately updated, so let's rename the field to make sure that
a hard compilation failure occurs.
Replacing delayChkpt with delayChkptFlags made a few comments extend
past 80 characters, so I reflowed them and changed some wording very
slightly.
The back-branches will need a different change to restore compatibility
with existing minor releases; this is just for master.
Per suggestion from Tom Lane.
Discussion: http://postgr.es/m/a7880f4d-1d74-582a-ada7-dad168d046d1@enterprisedb.com
This commit is contained in:
@@ -348,8 +348,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((MyProc->delayChkpt & DELAY_CHKPT_COMPLETE) == 0);
|
||||
MyProc->delayChkpt |= DELAY_CHKPT_COMPLETE;
|
||||
Assert((MyProc->delayChkptFlags & DELAY_CHKPT_COMPLETE) == 0);
|
||||
MyProc->delayChkptFlags |= DELAY_CHKPT_COMPLETE;
|
||||
|
||||
/*
|
||||
* We WAL-log the truncation before actually truncating, which means
|
||||
@@ -397,7 +397,7 @@ RelationTruncate(Relation rel, BlockNumber nblocks)
|
||||
smgrtruncate(RelationGetSmgr(rel), forks, nforks, blocks);
|
||||
|
||||
/* We've done all the critical work, so checkpoints are OK now. */
|
||||
MyProc->delayChkpt &= ~DELAY_CHKPT_COMPLETE;
|
||||
MyProc->delayChkptFlags &= ~DELAY_CHKPT_COMPLETE;
|
||||
|
||||
/*
|
||||
* Update upper-level FSM pages to account for the truncation. This is
|
||||
|
||||
Reference in New Issue
Block a user