Fix a typo in xlogreader.c
Hi,
The function comment of RestoreBlockImage() seems not correct since it
returns a boolean, not the buffer number.
/*
* Restore a full-page image from a backup block attached to an XLOG record.
*
* Returns the buffer number containing the page.
*/
bool
RestoreBlockImage(XLogReaderState *record, uint8 block_id, char *page)
Attached the patch that fixes it.
Regards,
--
Masahiko Sawada
EnterpriseDB: https://www.enterprisedb.com/
Attachments:
fix_typo_xlogreader.patchapplication/octet-stream; name=fix_typo_xlogreader.patchDownload
diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c
index 0e8c74f2bb..bb95e0e527 100644
--- a/src/backend/access/transam/xlogreader.c
+++ b/src/backend/access/transam/xlogreader.c
@@ -1545,7 +1545,7 @@ XLogRecGetBlockData(XLogReaderState *record, uint8 block_id, Size *len)
/*
* Restore a full-page image from a backup block attached to an XLOG record.
*
- * Returns the buffer number containing the page.
+ * Returns true if a full-page image is restored.
*/
bool
RestoreBlockImage(XLogReaderState *record, uint8 block_id, char *page)
On 2021-Jan-12, Masahiko Sawada wrote:
Hi,
The function comment of RestoreBlockImage() seems not correct since it
returns a boolean, not the buffer number.
You're right -- this has always been wrong. Pushed your patch.
Thank you!
--
�lvaro Herrera 39�49'30"S 73�17'W
"It takes less than 2 seconds to get to 78% complete; that's a good sign.
A few seconds later it's at 90%, but it seems to have stuck there. Did
somebody make percentages logarithmic while I wasn't looking?"
http://smylers.hates-software.com/2005/09/08/1995c749.html