Hi, While re-reading documentation about logical replication of generated columns, I came across this paragraph in the CREATE PUBLICATION ... FOR TABLE description [1].
---- When a column list is specified, only the named columns are replicated. 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 Section 29.5 for details about column lists. ---- That "except generated columns" part is not strictly correct because it fails to account for the 'publish_generated_columns' parameter. I've suggested a more accurate description below. SUGGESTION ---- When a column list is specified, only the named columns are replicated. Stored generated columns may be included in the list. Specifying a column list has no effect on TRUNCATE commands. See Section 29.5 for details about column lists. If no column list is specified, all table columns are replicated through this publication, including any columns added later. Generated columns are included in this case only if publish_generated_columns is set to stored. ---- I've attached a patch to implement this suggested wording. Thoughts? ====== [1] https://www.postgresql.org/docs/devel/sql-createpublication.html#SQL-CREATEPUBLICATION-PARAMS-FOR-TABLE Kind Regards, Peter Smith. Fujitsu Australia
v1-0001-DOCS-create-publication-for-table.patch
Description: Binary data