mirror of
https://github.com/postgres/postgres.git
synced 2025-11-28 11:44:57 +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:
@@ -1387,14 +1387,14 @@ RecordTransactionCommit(void)
|
||||
* RecordTransactionAbort. That's because loss of a transaction abort
|
||||
* is noncritical; the presumption would be that it aborted, anyway.
|
||||
*
|
||||
* It's safe to change the delayChkpt flag of our own backend without
|
||||
* holding the ProcArrayLock, since we're the only one modifying it.
|
||||
* This makes checkpoint's determination of which xacts are delayChkpt
|
||||
* a bit fuzzy, but it doesn't matter.
|
||||
* It's safe to change the delayChkptFlags flag of our own backend
|
||||
* without holding the ProcArrayLock, since we're the only one
|
||||
* modifying it. This makes checkpoint's determination of which xacts
|
||||
* are delaying the checkpoint a bit fuzzy, but it doesn't matter.
|
||||
*/
|
||||
Assert((MyProc->delayChkpt & DELAY_CHKPT_START) == 0);
|
||||
Assert((MyProc->delayChkptFlags & DELAY_CHKPT_START) == 0);
|
||||
START_CRIT_SECTION();
|
||||
MyProc->delayChkpt |= DELAY_CHKPT_START;
|
||||
MyProc->delayChkptFlags |= DELAY_CHKPT_START;
|
||||
|
||||
SetCurrentTransactionStopTimestamp();
|
||||
|
||||
@@ -1496,7 +1496,7 @@ RecordTransactionCommit(void)
|
||||
*/
|
||||
if (markXidCommitted)
|
||||
{
|
||||
MyProc->delayChkpt &= ~DELAY_CHKPT_START;
|
||||
MyProc->delayChkptFlags &= ~DELAY_CHKPT_START;
|
||||
END_CRIT_SECTION();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user