Skip to content

Commit

Permalink
Fix outdated comment that talked about seek position of WAL file.
Browse files Browse the repository at this point in the history
Since commit c24dcd0, 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()
  • Loading branch information
hlinnaka committed Jun 16, 2021
1 parent d3c8784 commit d0303bc
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/backend/access/transam/xlog.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d0303bc

Please sign in to comment.