public inbox for [email protected]  
help / color / mirror / Atom feed
From: Shubham Khanna <[email protected]>
To: Peter Smith <[email protected]>
Cc: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: Shlok Kyal <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Rajendra Kumar Dangwal <[email protected]>
Cc: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Pgoutput not capturing the generated columns
Date: Tue, 16 Jul 2024 16:53:45 +0530
Message-ID: <CAHv8RjKQJTmapc=6CPsGsJPTEom2LxF+EctWDNh9XxtvL2vJ9g@mail.gmail.com> (raw)
In-Reply-To: <CAHut+PtzEvm1af1LK8x5KXeku-_mgHthiHQAOW-mYYOFfu53ig@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<CAHv8RjKEBtFfUbmdHPYV1K76bb8PEm6R=iLZko4Dxy2Oh-_uUw@mail.gmail.com>
	<CAHut+PsuJfcaeg6zst=6PE5uyJv_UxVRHU3ck7W2aHb1uQYKng@mail.gmail.com>
	<CAHv8RjJcOsk=y+vJ3y+vXhzR9ZUzUEURvS_90hQW3MNfJ5di7A@mail.gmail.com>
	<CALDaNm3-qiNuf4Wy2E1HtG=SLBJEFGnh010Fqc8eO=Lyg5+pfQ@mail.gmail.com>
	<CAHv8RjJn6EiyAitJbbvkvVV2d45fV3Wjr2VmWFugm3RsbaU+Rg@mail.gmail.com>
	<CANhcyEWm+EUuWViQH9mTuzLAtvTrDCr5vLPoeeVMRK=aUzbRdA@mail.gmail.com>
	<CAHv8Rj+Ai0CgtXiAga82bWpWB8fVcOWycNyJ_jqXm788v3R8rQ@mail.gmail.com>
	<CAHut+PujrRQ63ju8P41tBkdjkQb4X9uEdLK_Wkauxum1MVUdfA@mail.gmail.com>
	<CAHv8Rj+6kwOGmn5MsRaTmciJDxtvNsyszMoPXV62OGPGzkxrCg@mail.gmail.com>
	<TY2PR01MB2553204D182558873E40CA66F5CB2@TY2PR01MB2553.jpnprd01.prod.outlook.com>
	<CAHv8RjJpS_XDkR6OrsmMZtCBZNxeYoCdENhC0=be0rLmNvhiQw@mail.gmail.com>
	<CAHut+Pv45gB4cV+SSs6730Kb8urQyqjdZ9PBVgmpwqCycr1Ybg@mail.gmail.com>
	<CAHv8RjLLy=otO_c0y5FN2jipajC2J6+ZRaTcWmEv4X1kmzAjtw@mail.gmail.com>
	<CAHut+PvST7be97xnxFjiHpz=WSr9MV567DLP4O-o7=Kb26pHTA@mail.gmail.com>
	<CAHv8Rj+=hn--ALJQvzzu7meX3LuO3tJKppDS7eO1BGvNFYBAbg@mail.gmail.com>
	<CAHut+Pv50FoqfM7f-3SJ441UDzLfG9LqgggLm1Cm0DcGG6VCnQ@mail.gmail.com>
	<CAHv8RjJ0gAUd62PvBRXCPYy2oTNZWEY-Qe8cBNzQaJPVMZCeGA@mail.gmail.com>
	<CAHut+PtzEvm1af1LK8x5KXeku-_mgHthiHQAOW-mYYOFfu53ig@mail.gmail.com>

On Mon, Jul 15, 2024 at 11:09 AM Peter Smith <[email protected]> wrote:
>
> Hi, I had a quick look at the patch v17-0004 which is the split-off
> new BMS logic.
>
> IIUC this 0004 is currently undergoing some refactoring and
> cleaning-up, so I won't comment much about it except to give the
> following observation below.
>
> ======
> src/backend/replication/logical/proto.c.
>
> I did not expect to see any code fragments that are still checking
> generated columns like below:
>
> logicalrep_write_tuple:
>
>   if (att->attgenerated)
>   {
> - if (!include_generated_columns)
> - continue;
>
>   if (att->attgenerated != ATTRIBUTE_GENERATED_STORED)
>   continue;
> ~
>
>   if (att->attgenerated)
>   {
> - if (!include_generated_columns)
> - continue;
>
>   if (att->attgenerated != ATTRIBUTE_GENERATED_STORED)
>   continue;
>
> ~~~
>
> logicalrep_write_attrs:
>
>   if (att->attgenerated)
>   {
> - if (!include_generated_columns)
> - continue;
>
>   if (att->attgenerated != ATTRIBUTE_GENERATED_STORED)
>   continue;
>
> ~
> if (att->attgenerated)
>   {
> - if (!include_generated_columns)
> - continue;
>
>   if (att->attgenerated != ATTRIBUTE_GENERATED_STORED)
>   continue;
> ~~~
>
>
> AFAIK, now checking support of generated columns will be done when the
> BMS 'columns' is assigned, so the continuation code will be handled
> like this:
>
> if (!column_in_column_list(att->attnum, columns))
>   continue;
>
> ======
>
> BTW there is a subtle but significant difference in this 0004 patch.
> IOW, we are introducing a difference between the list of published
> columns VERSUS a publication column list. So please make sure that all
> code comments are adjusted appropriately so they are not misleading by
> calling these "column lists" still.
>
> BEFORE: BMS 'columns'  means "columns of the column list" or NULL if
> there was no publication column list
> AFTER: BMS 'columns' means "columns to be replicated" or NULL if all
> columns are to be replicated

I have addressed all the comments in v19-0004 patch.
Please refer to the updated v19-0004 Patch here in [1]. See [1] for
the changes added.

[1] https://www.postgresql.org/message-id/CAHv8Rj%2BR0cj%3Dz1bTMAgQKQWx1EKvkMEnV9QsHGvOqTdnLUQi1A%40mail...

Thanks and Regards,
Shubham Khanna.






view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Pgoutput not capturing the generated columns
  In-Reply-To: <CAHv8RjKQJTmapc=6CPsGsJPTEom2LxF+EctWDNh9XxtvL2vJ9g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox