Update the LSN format in the comment example

From: Japin Li <japinli(at)hotmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Update the LSN format in the comment example
Date: 2025-08-12 07:44:56
Message-ID: ME0P300MB0445A37908EFCCD15E6D749DB62BA@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, all

Commit 2633dae2e487 standardized LSN formatting with zero-padding. However,
a mistake was made (by me) in the example within a comment.

This patch provides a fix for that.

diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h
index 514f03df0b6..2397fb24115 100644
--- a/src/include/access/xlogdefs.h
+++ b/src/include/access/xlogdefs.h
@@ -38,7 +38,7 @@ typedef uint64 XLogRecPtr;
/*
* Handy macro for printing XLogRecPtr in conventional format, e.g.,
*
- * printf("%X/08X", LSN_FORMAT_ARGS(lsn));
+ * printf("%X/%08X", LSN_FORMAT_ARGS(lsn));
*
* To avoid breaking translatable messages, we're directly applying the
* LSN format instead of using a macro.

--
Best regards,
Japin Li
ChengDu WenWu Information Technology Co., LTD.

Attachment Content-Type Size
0001-Update-the-LSN-format-in-the-comment-example.patch text/x-diff 923 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2025-08-12 07:48:10 Per backend relation statistics tracking
Previous Message Japin Li 2025-08-12 07:38:34 Re: Excessive LOG messages from replication slot sync worker