Clarify locking for PageGetLSN() in XLogCheckBuffer()
authorSimon Riggs <simon@2ndQuadrant.com>
Mon, 3 Dec 2012 12:20:31 +0000 (12:20 +0000)
committerSimon Riggs <simon@2ndQuadrant.com>
Mon, 3 Dec 2012 12:20:31 +0000 (12:20 +0000)
src/backend/access/transam/xlog.c

index c8ac97fbf7fac6cddfd7019e19d252da285c501e..411807006ac6cd49ac47774d8d7f6171254293cf 100644 (file)
@@ -1212,7 +1212,8 @@ XLogCheckBuffer(XLogRecData *rdata, bool doPageWrites,
    /*
     * XXX We assume page LSN is first data on *every* page that can be passed
     * to XLogInsert, whether it otherwise has the standard page layout or
-    * not.
+    * not. We don't need the buffer header lock for PageGetLSN because we
+    * have exclusive lock on the page and/or the relation.
     */
    *lsn = PageGetLSN(page);