From e65dbc9927fb86aa3c8a914ede6a6ae934384f5a Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Thu, 23 Jan 2025 15:28:37 +0530 Subject: Change publication's publish_generated_columns option type to enum. The current boolean publish_generated_columns option only supports a binary choice, which is insufficient for future enhancements where generated columns can be of different types (e.g., stored or virtual). The supported values for the publish_generated_columns option are 'none' and 'stored'. Author: Vignesh C Reviewed-by: Peter Smith Reviewed-by: Peter Eisentraut Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/d718d219-dd47-4a33-bb97-56e8fc4da994@eisentraut.org Discussion: https://postgr.es/m/B80D17B2-2C8E-4C7D-87F2-E5B4BE3C069E@gmail.com --- doc/src/sgml/catalogs.sgml | 14 ++++++++++++++ doc/src/sgml/ref/create_publication.sgml | 29 ++++++++++++++++++++--------- 2 files changed, 34 insertions(+), 9 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml index d3036c5ba9d..c88bcaa7df9 100644 --- a/doc/src/sgml/catalogs.sgml +++ b/doc/src/sgml/catalogs.sgml @@ -6394,6 +6394,20 @@ SCRAM-SHA-256$<iteration count>:&l + + + pubgencols char + + + Controls how to handle generated column replication when there is no + publication column list: + n = generated columns in the tables associated with + the publication should not be replicated, + s = stored generated columns in the tables associated + with the publication should be replicated. + + + pubviaroot bool diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml index 5e25536554a..e822ea2aaa9 100644 --- a/doc/src/sgml/ref/create_publication.sgml +++ b/doc/src/sgml/ref/create_publication.sgml @@ -89,10 +89,10 @@ CREATE PUBLICATION name When a column list is specified, only the named columns are replicated. - The column list can contain generated columns as well. If no column list - is specified, all table columns (except generated columns) are replicated - through this publication, including any columns added later. It has no - effect on TRUNCATE commands. See + The column list can contain stored generated columns as well. If no + column list is specified, all table columns (except generated columns) + are replicated through this publication, including any columns added + later. It has no effect on TRUNCATE commands. See for details about column lists. @@ -190,20 +190,31 @@ CREATE PUBLICATION name - publish_generated_columns (boolean) + publish_generated_columns (enum) Specifies whether the generated columns present in the tables - associated with the publication should be replicated. - The default is false. + associated with the publication should be replicated. Possible values + are none and stored. + + + + The default is none meaning the generated + columns present in the tables associated with publication will not be + replicated. + + + + If set to stored, the stored generated columns + present in the tables associated with publication will be replicated. If the subscriber is from a release prior to 18, then initial table synchronization won't copy generated columns even if parameter - publish_generated_columns is true in the - publisher. + publish_generated_columns is stored + in the publisher. -- cgit v1.2.3