mirror of
https://github.com/postgres/postgres.git
synced 2025-09-09 13:09:39 +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:
@@ -4021,7 +4021,7 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
|
||||
{
|
||||
XLogRecPtr lsn = InvalidXLogRecPtr;
|
||||
bool dirtied = false;
|
||||
bool delayChkpt = false;
|
||||
bool delayChkptFlags = false;
|
||||
uint32 buf_state;
|
||||
|
||||
/*
|
||||
@@ -4071,9 +4071,9 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
|
||||
* essential that CreateCheckPoint waits for virtual transactions
|
||||
* rather than full transactionids.
|
||||
*/
|
||||
Assert((MyProc->delayChkpt & DELAY_CHKPT_START) == 0);
|
||||
MyProc->delayChkpt |= DELAY_CHKPT_START;
|
||||
delayChkpt = true;
|
||||
Assert((MyProc->delayChkptFlags & DELAY_CHKPT_START) == 0);
|
||||
MyProc->delayChkptFlags |= DELAY_CHKPT_START;
|
||||
delayChkptFlags = true;
|
||||
lsn = XLogSaveBufferForHint(buffer, buffer_std);
|
||||
}
|
||||
|
||||
@@ -4105,8 +4105,8 @@ MarkBufferDirtyHint(Buffer buffer, bool buffer_std)
|
||||
buf_state |= BM_DIRTY | BM_JUST_DIRTIED;
|
||||
UnlockBufHdr(bufHdr, buf_state);
|
||||
|
||||
if (delayChkpt)
|
||||
MyProc->delayChkpt &= ~DELAY_CHKPT_START;
|
||||
if (delayChkptFlags)
|
||||
MyProc->delayChkptFlags &= ~DELAY_CHKPT_START;
|
||||
|
||||
if (dirtied)
|
||||
{
|
||||
|
Reference in New Issue
Block a user