Re: Pgoutput not capturing the generated columns
Peter Smith <smithpb2250@gmail.com>
On Mon, Jun 3, 2024 at 9:52 PM Shlok Kyal <shlok.kyal.oss@gmail.com> wrote: > > > > > The attached Patch contains the suggested changes. > > > > Hi, > > Currently, COPY command does not work for generated columns and > therefore, COPY of generated column is not supported during tablesync > process. So, in patch v4-0001 we added a check to allow replication of > the generated column only if 'copy_data = false'. > > I am attaching patches to resolve the above issues. > > v5-0001: not changed > v5-0002: Support COPY of generated column > v5-0003: Support COPY of generated column during tablesync process > Hi Shlok, I have a question about patch v5-0003. According to the patch 0001 docs "If the subscriber-side column is also a generated column then this option has no effect; the replicated data will be ignored and the subscriber column will be filled as normal with the subscriber-side computed or default data". Doesn't this mean it will be a waste of effort/resources to COPY any column value where the subscriber-side column is generated since we know that any copied value will be ignored anyway? But I don't recall seeing any comment or logic for this kind of copy optimisation in the patch 0003. Is this already accounted for somewhere and I missed it, or is my understanding wrong? ====== Kind Regards, Peter Smith. Fujitsu Australia
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