Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix outdated comment that talked about seek position of WAL file.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 16 Jun 2021 09:34:32 +0000 (12:34 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 16 Jun 2021 09:36:15 +0000 (12:36 +0300)
Since commit c24dcd0cfd, we have been using pg_pread() to read the WAL
file, which doesn't change the seek position (unless we fall back to
the implementation in src/port/pread.c). Update comment accordingly.

Backpatch-through: 12, where we started to use pg_pread()

src/backend/access/transam/xlog.c

index 17eeff072004c8ed4f7643590ff96286cc1192dd..1b3a3d9beab9c287d367575f60481a351e3918da 100644 (file)
@@ -809,11 +809,9 @@ static XLogSegNo openLogSegNo = 0;
 
 /*
  * These variables are used similarly to the ones above, but for reading
- * the XLOG.  Note, however, that readOff generally represents the offset
- * of the page just read, not the seek position of the FD itself, which
- * will be just past that page. readLen indicates how much of the current
- * page has been read into readBuf, and readSource indicates where we got
- * the currently open file from.
+ * the XLOG.  readOff is the offset of the page just read, readLen
+ * indicates how much of it has been read into readBuf, and readSource
+ * indicates where we got the currently open file from.
  * Note: we could use Reserve/ReleaseExternalFD to track consumption of
  * this FD too; but it doesn't currently seem worthwhile, since the XLOG is
  * not read by general-purpose sessions.