Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1c563a2

Browse files
Clarify when to use PageSetLSN/PageGetLSN().
Update README to explain prerequisites forcorrect access to LSN fields of a page.Independent chunk removed from checksumspatch to reduce size of patch.
1 parenta068c39 commit1c563a2

File tree

1 file changed

+8
-0
lines changed
  • src/backend/access/transam

1 file changed

+8
-0
lines changed

‎src/backend/access/transam/README

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,14 @@ something like
564564
if (BufferIsValid(buffer0))
565565
UnlockReleaseBuffer(buffer0);
566566

567+
Note that we must only use PageSetLSN/PageGetLSN() when we know the action
568+
is serialised. Only Startup process may modify data blocks during recovery,
569+
so Startup process may execute PageGetLSN() without fear of serialisation
570+
problems. All other processes must only call PageSet/GetLSN when holding
571+
either an exclusive buffer lock or a shared lock plus buffer header lock,
572+
or be writing the data block directly rather than through shared buffers
573+
while holding AccessExclusiveLock on the relation.
574+
567575
Due to all these constraints, complex changes (such as a multilevel index
568576
insertion) normally need to be described by a series of atomic-action WAL
569577
records. What do you do if the intermediate states are not self-consistent?

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp