Update the LSN format in the comment example
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.
Attachments:
0001-Update-the-LSN-format-in-the-comment-example.patchtext/x-diff; charset=us-asciiDownload
From 24bc8e321b6c60f7659962eabe0288bf89fae3e0 Mon Sep 17 00:00:00 2001
From: Japin Li <japinli@hotmail.com>
Date: Tue, 12 Aug 2025 15:26:34 +0800
Subject: [PATCH] Update the LSN format in the comment example
The previous comment example use %X/08X, which is incorrect. The standardized
format is %X/%08X.
---
src/include/access/xlogdefs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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.
--
2.43.0
On Tue, Aug 12, 2025 at 4:45 PM Japin Li <japinli@hotmail.com> wrote:
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.
LGTM.
Barring any objections, I'll commit the patch.
Regards,
--
Fujii Masao
On Tue, Aug 12, 2025 at 7:36 PM Fujii Masao <masao.fujii@gmail.com> wrote:
On Tue, Aug 12, 2025 at 4:45 PM Japin Li <japinli@hotmail.com> wrote:
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.LGTM.
Barring any objections, I'll commit the patch.
Pushed. Thanks!
Regards,
--
Fujii Masao
On Thu, Aug 14, 2025 at 11:13:28AM +0900, Fujii Masao wrote:
On Tue, Aug 12, 2025 at 7:36 PM Fujii Masao <masao.fujii@gmail.com> wrote:
On Tue, Aug 12, 2025 at 4:45 PM Japin Li <japinli@hotmail.com> wrote:
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.LGTM.
Barring any objections, I'll commit the patch.Pushed. Thanks!
Thank you!
--
Best regards,
Japin Li
ChengDu WenWu Information Technology Co., LTD.