Re: Pgoutput not capturing the generated columns
Amit Kapila <amit.kapila16@gmail.com>
On Mon, Nov 4, 2024 at 10:30 AM Peter Smith <smithpb2250@gmail.com> wrote: > > On Mon, Nov 4, 2024 at 12:28 AM vignesh C <vignesh21@gmail.com> wrote: > > Thanks for the latest doc v2 "fix" patch. Here are my review comments about it. > > ====== > src/sgml/logical-replication.sgml > > 1. > During initial data synchronization, only the published columns are > copied. However, if the subscriber is from a release prior to 15, then > all the columns in the table are copied during initial data synchronization, > - ignoring any column lists. > + ignoring any column lists. If the subscriber is from a release prior to 18, > + then initial table synchronization won't copy generated columns data even if > + they are defined in the publisher. > > There are some inconsistencies with the markup etc. > > a) For publication row filters the text about Initial Synchronization > version differences is using SGML <Note> markup. But, for "Column > Lists" the similar text about Initial Synchronization version > differences is just plain paragraph text. So, shouldn't this also be > using a <Note> markup for better documentation consistency? > I don't think both are comparable as the row filters section has a separate sub-section for Initial Data Synchronization. In general, I find the way things are described in the Column Lists sub-section more like other parts of the documentation. Moreover, this patch has just extended the existing docs. > b) I also thought "even if they are defined in the publisher" wording > seems like it is referring about the table definition, but IMO it > needs to convey something more like "even when they are published" > > SUGGESTION > If the subscriber is from a release prior to 18, copy pre-existing > data does not copy generated columns even when they are published. > This is because old releases ignore generated table data during the > copy. > The second line says something obvious and doesn't seem to be required. The change "even when they are published" is debatable as I didn't read the way you read Vignesh's proposed wording, to me it was clear what the doc is saying. I have already pushed Vignesh's version with a minor modification. -- 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