Re: Pgoutput not capturing the generated columns
Amit Kapila <amit.kapila16@gmail.com>
On Sat, Sep 21, 2024 at 3:19 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > On Thu, Sep 19, 2024 at 9:26 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > > > > > > OK. Let me give some examples below to help understand this idea. > > > > > > Please correct me if these are incorrect. > > > > > > Examples, when publish_generated_columns=true: > > > > > > CREATE PUBLICATION pub1 FOR t1(a,b,gen2), t2 WITH > > > (publish_generated_columns=true) > > > t1 -> publishes a, b, gen2 (e.g. what column list says) > > > t2 -> publishes c, d + ALSO gen1, gen2 > > > > > > CREATE PUBLICATION pub1 FOR t1, t2(gen1) WITH (publish_generated_columns=true) > > > t1 -> publishes a, b + ALSO gen1, gen2 > > > t2 -> publishes gen1 (e.g. what column list says) > > > > > > > These two could be controversial because one could expect that if > > "publish_generated_columns=true" then publish generated columns > > irrespective of whether they are mentioned in column_list. I am of the > > opinion that column_list should take priority the results should be as > > mentioned by you but let us see if anyone thinks otherwise. > > I agree with Amit. We also publish t2's future generated column in the > first example and t1's future generated columns in the second example. > Right, it would be good to have at least one test that shows future generated columns also get published wherever applicable (like where column_list is not given and publish_generated_columns is true). -- With Regards, Amit Kapila.
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