Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 72867b1

Browse files
peterepull[bot]
authored andcommitted
Fix XLogPageRead() comment
7fcbf6a and 2ff6555 changed the function signature of XLogPageRead() but did not update the comment. XLogReaderRoutine contains up to date information about the API, so no need to repeat all that at XLogPageRead(), but fix the mentions of the no longer existing function arguments.
1 parent 2f1d3eb commit 72867b1

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/backend/access/transam/xlogrecovery.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,22 +3145,24 @@ ReadRecord(XLogPrefetcher *xlogprefetcher, int emode,
31453145
}
31463146

31473147
/*
3148-
* Read the XLOG page containing RecPtr into readBuf (if not read already).
3149-
* Returns number of bytes read, if the page is read successfully, or
3150-
* XLREAD_FAIL in case of errors. When errors occur, they are ereport'ed, but
3151-
* only if they have not been previously reported.
3148+
* Read the XLOG page containing targetPagePtr into readBuf (if not read
3149+
* already). Returns number of bytes read, if the page is read successfully,
3150+
* or XLREAD_FAIL in case of errors. When errors occur, they are ereport'ed,
3151+
* but only if they have not been previously reported.
3152+
*
3153+
* See XLogReaderRoutine.page_read for more details.
31523154
*
31533155
* While prefetching, xlogreader->nonblocking may be set. In that case,
31543156
* returns XLREAD_WOULDBLOCK if we'd otherwise have to wait for more WAL.
31553157
*
31563158
* This is responsible for restoring files from archive as needed, as well
31573159
* as for waiting for the requested WAL record to arrive in standby mode.
31583160
*
3159-
* 'emode' specifies the log level used for reporting "file not found" or
3160-
* "end of WAL" situations in archive recovery, or in standby mode when
3161-
* promotion is triggered. If set to WARNING or below, XLogPageRead() returns
3162-
* XLREAD_FAIL in those situations, on higher log levels the ereport() won't
3163-
* return.
3161+
* xlogreader->private_data->emode specifies the log level used for reporting
3162+
* "file not found" or "end of WAL" situations in archive recovery, or in
3163+
* standby mode when promotion is triggered. If set to WARNING or below,
3164+
* XLogPageRead() returns XLREAD_FAIL in those situations, on higher log
3165+
* levels the ereport() won't return.
31643166
*
31653167
* In standby mode, if after a successful return of XLogPageRead() the
31663168
* caller finds the record it's interested in to be broken, it should

0 commit comments

Comments
 (0)