patch: Add missing descriptions for rmgr APIs

Started by kuroda.hayato@fujitsu.comover 3 years ago4 messages
#1kuroda.hayato@fujitsu.com
kuroda.hayato@fujitsu.com
1 attachment(s)

Hi hackers,

While reading codes related with logical decoding,
I thought that following comment in rmgrlist.h is not consistent.

/* symbol name, textual name, redo, desc, identify, startup, cleanup */

This comment describes a set of APIs that the resource manager should have, but functions for {mask, decode} are missed here.

Did we have any reasons for that? I thought it might be not friendly, so I attached a patch.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED

Attachments:

0001-add-a-missing-comment.patchapplication/octet-stream; name=0001-add-a-missing-comment.patchDownload
From ac5ce39f42ae126c08f02041206b1d212b1374ed Mon Sep 17 00:00:00 2001
From: "kuroda.hayato%40jp.fujitsu.com" <kuroda.hayato@jp.fujitsu.com>
Date: Mon, 29 Aug 2022 03:03:13 +0000
Subject: [PATCH] add a missing comment

---
 src/include/access/rmgrlist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/access/rmgrlist.h b/src/include/access/rmgrlist.h
index 9a74721c97..096bea08ca 100644
--- a/src/include/access/rmgrlist.h
+++ b/src/include/access/rmgrlist.h
@@ -24,7 +24,7 @@
  * Changes to this list possibly need an XLOG_PAGE_MAGIC bump.
  */
 
-/* symbol name, textual name, redo, desc, identify, startup, cleanup */
+/* symbol name, textual name, redo, desc, identify, startup, cleanup, decode */
 PG_RMGR(RM_XLOG_ID, "XLOG", xlog_redo, xlog_desc, xlog_identify, NULL, NULL, NULL, xlog_decode)
 PG_RMGR(RM_XACT_ID, "Transaction", xact_redo, xact_desc, xact_identify, NULL, NULL, NULL, xact_decode)
 PG_RMGR(RM_SMGR_ID, "Storage", smgr_redo, smgr_desc, smgr_identify, NULL, NULL, NULL, NULL)
-- 
2.27.0

#2Amit Kapila
amit.kapila16@gmail.com
In reply to: kuroda.hayato@fujitsu.com (#1)
Re: patch: Add missing descriptions for rmgr APIs

On Mon, Aug 29, 2022 at 8:48 AM kuroda.hayato@fujitsu.com
<kuroda.hayato@fujitsu.com> wrote:

Hi hackers,

While reading codes related with logical decoding,
I thought that following comment in rmgrlist.h is not consistent.

/* symbol name, textual name, redo, desc, identify, startup, cleanup */

This comment describes a set of APIs that the resource manager should have, but functions for {mask, decode} are missed here.

Your observation seems correct to me but you have not updated the
comment for the mask. Is there a reason for the same?

--
With Regards,
Amit Kapila.

#3kuroda.hayato@fujitsu.com
kuroda.hayato@fujitsu.com
In reply to: Amit Kapila (#2)
1 attachment(s)
RE: patch: Add missing descriptions for rmgr APIs

Your observation seems correct to me but you have not updated the
comment for the mask. Is there a reason for the same?

Oh, it seems that I attached wrong one. There is no reason.
PSA the newer version.

Best Regards,
Hayato Kuroda
FUJITSU LIMITED

Attachments:

v2-0001-add-a-missing-comment.patchapplication/octet-stream; name=v2-0001-add-a-missing-comment.patchDownload
From 782d62ea833d06469fef9e8d7930bc57cedd49c8 Mon Sep 17 00:00:00 2001
From: "kuroda.hayato%40jp.fujitsu.com" <kuroda.hayato@jp.fujitsu.com>
Date: Mon, 29 Aug 2022 12:44:14 +0000
Subject: [PATCH v2] add a missing comment

---
 src/include/access/rmgrlist.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/include/access/rmgrlist.h b/src/include/access/rmgrlist.h
index 9a74721c97..000bcbfdaf 100644
--- a/src/include/access/rmgrlist.h
+++ b/src/include/access/rmgrlist.h
@@ -24,7 +24,7 @@
  * Changes to this list possibly need an XLOG_PAGE_MAGIC bump.
  */
 
-/* symbol name, textual name, redo, desc, identify, startup, cleanup */
+/* symbol name, textual name, redo, desc, identify, startup, cleanup, mask, decode */
 PG_RMGR(RM_XLOG_ID, "XLOG", xlog_redo, xlog_desc, xlog_identify, NULL, NULL, NULL, xlog_decode)
 PG_RMGR(RM_XACT_ID, "Transaction", xact_redo, xact_desc, xact_identify, NULL, NULL, NULL, xact_decode)
 PG_RMGR(RM_SMGR_ID, "Storage", smgr_redo, smgr_desc, smgr_identify, NULL, NULL, NULL, NULL)
-- 
2.27.0

#4Amit Kapila
amit.kapila16@gmail.com
In reply to: kuroda.hayato@fujitsu.com (#3)
Re: patch: Add missing descriptions for rmgr APIs

On Mon, Aug 29, 2022 at 6:19 PM kuroda.hayato@fujitsu.com
<kuroda.hayato@fujitsu.com> wrote:

Your observation seems correct to me but you have not updated the
comment for the mask. Is there a reason for the same?

Oh, it seems that I attached wrong one. There is no reason.
PSA the newer version.

LGTM. Pushed.

--
With Regards,
Amit Kapila.