8000 Clarify locking for PageGetLSN() in XLogCheckBuffer() · postgrespro/postgres_cluster@7a76499 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a76499

Browse files
Clarify locking for PageGetLSN() in XLogCheckBuffer()
1 parent 1c563a2 commit 7a76499

File tree

1 file changed

+2
-1
lines changed
  • src/backend/access/transam

1 file changed

+2
-1
lines changed

src/backend/access/transam/xlog.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,8 @@ XLogCheckBuffer(XLogRecData *rdata, bool doPageWrites,
12121212
/*
12131213
* XXX We assume page LSN is first data on *every* page that can be passed
12141214
* to XLogInsert, whether it otherwise has the standard page layout or
1215-
* not.
1215+
* not. We don't need the buffer header lock for PageGetLSN because we
1216+
* have exclusive lock on the page and/or the relation.
12161217
*/
12171218
*lsn = PageGetLSN(page);
12181219

0 commit comments

Comments
 (0)
0