Re: Pgoutput not capturing the generated columns
Shubham Khanna <khannashubham1197@gmail.com>
Attachments
- v11-0002-Support-replication-of-generated-column-during-i.patch (application/octet-stream) patch v11-0002
- v11-0001-Enable-support-for-include_generated_columns-opt.patch (application/octet-stream) patch v11-0001
- v11-0003-Fix-behaviour-for-Virtual-Generated-columns.patch (application/octet-stream) patch v11-0003
On Sun, Jun 23, 2024 at 10:28 AM Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> wrote: > > Hi Shubham, > > Thanks for sharing new patch! You shared as v9, but it should be v10, right? > Also, since there are no commitfest entry, I registered [1]. You can rename the > title based on the needs. Currently CFbot said OK. > > Anyway, below are my comments. > > 01. General > Your patch contains unnecessary changes. Please remove all of them. E.g., > > ``` > " s.subpublications,\n"); > - > ``` > And > ``` > appendPQExpBufferStr(query, " o.remote_lsn AS suboriginremotelsn,\n" > - " s.subenabled,\n"); > + " s.subenabled,\n"); > ``` > > 02. General > Again, please run the pgindent/pgperltidy. > > 03. test_decoding > Previously I suggested to the default value of to be include_generated_columns > should be true, so you modified like that. However, Peter suggested opposite > opinion [3] and you just revised accordingly. I think either way might be okay, but > at least you must clarify the reason why you preferred to set default to false and > changed accordingly. I have set the default value as true in case of test_decoding. The reason for this is even before the new feature implementation, generated columns were getting selected. > 04. decoding_into_rel.sql > According to the comment atop this file, this test should insert result to a table. > But added case does not - we should put them at another place. I.e., create another > file. > > 05. decoding_into_rel.sql > ``` > +-- when 'include-generated-columns' is not set > ``` > Can you clarify the expected behavior as a comment? > > 06. getSubscriptions > ``` > + else > + appendPQExpBufferStr(query, > + " false AS subincludegencols,\n"); > ``` > I think the comma is not needed. > Also, this error meant that you did not test to use pg_dump for instances prior PG16. > Please verify whether we can dump subscriptions and restore them accordingly. > > [1]: https://commitfest.postgresql.org/48/5068/ > [2]: https://www.postgresql.org/message-id/OSBPR01MB25529997E012DEABA8E15A02F5E52%40OSBPR01MB2552.jpnprd01.prod.outlook.com > [3]: https://www.postgresql.org/message-id/CAHut%2BPujrRQ63ju8P41tBkdjkQb4X9uEdLK_Wkauxum1MVUdfA%40mail.gmail.com All the comments are handled. The attached Patches contains all the suggested changes. Thanks and Regards, Shubham Khanna.
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Doc: Generated column replication.
- 6252b1eaf82b 18.0 landed
-
Rename pubgencols_type to pubgencols in pg_publication.
- 75eb9766ec20 18.0 landed
-
Doc: Fix column name in pg_publication catalog.
- 117f9f328e0f 18.0 landed
-
Fix buildfarm failure introduced by commit e65dbc9927.
- b35434b134b1 18.0 landed
-
Change publication's publish_generated_columns option type to enum.
- e65dbc9927fb 18.0 landed
-
Fix \dRp+ output when describing publications with a lower server version.
- 991974bb4888 18.0 landed
-
Replicate generated columns when 'publish_generated_columns' is set.
- 7054186c4ebe 18.0 landed
-
Doc: Update the behavior of generated columns in Logical Replication.
- 5b0c46ea0932 18.0 landed
-
Replicate generated columns when specified in the column list.
- 745217a051a9 18.0 landed
-
Doc: Generated columns are skipped for logical replication.
- 7a089f6e6a14 17.0 cited