mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Comment on need to MarkBufferDirty() if omitting DELAY_CHKPT_START.
Blocking checkpoint phase 2 requires MarkBufferDirty() and BUFFER_LOCK_EXCLUSIVE; neither suffices by itself. transam/README documents this, citing SyncOneBuffer(). Update the DELAY_CHKPT_START documentation to say this. Expand the heap_inplace_update_and_unlock() comment that cites XLogSaveBufferForHint() as precedent, since heap_inplace_update_and_unlock() could have opted not to use DELAY_CHKPT_START. Commit8e7e672cdaadded DELAY_CHKPT_START to heap_inplace_update_and_unlock(). Since commitbc6bad8857reverted it in non-master branches, no back-patch. Discussion: https://postgr.es/m/20250406180054.26.nmisch@google.com
This commit is contained in:
@@ -110,10 +110,10 @@ extern PGDLLIMPORT int FastPathLockGroupsPerBackend;
|
||||
* is inserted prior to the new redo point, the corresponding data changes will
|
||||
* also be flushed to disk before the checkpoint can complete. (In the
|
||||
* extremely common case where the data being modified is in shared buffers
|
||||
* and we acquire an exclusive content lock on the relevant buffers before
|
||||
* writing WAL, this mechanism is not needed, because phase 2 will block
|
||||
* until we release the content lock and then flush the modified data to
|
||||
* disk.)
|
||||
* and we acquire an exclusive content lock and MarkBufferDirty() on the
|
||||
* relevant buffers before writing WAL, this mechanism is not needed, because
|
||||
* phase 2 will block until we release the content lock and then flush the
|
||||
* modified data to disk. See transam/README and SyncOneBuffer().)
|
||||
*
|
||||
* Setting DELAY_CHKPT_COMPLETE prevents the system from moving from phase 2
|
||||
* to phase 3. This is useful if we are performing a WAL-logged operation that
|
||||
|
||||
Reference in New Issue
Block a user