aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2024-12-04 09:45:18 +0530
committerAmit Kapila <akapila@postgresql.org>2024-12-04 09:45:18 +0530
commit87ce27de6963091f4a365f80bcdb06b9da098f00 (patch)
tree11927a574013d2b8edfd6f80298c4c6f23935580 /doc/src
parent77c189cdafe3873b7273149fbc490cc11c431cc3 (diff)
downloadpostgresql-87ce27de6963091f4a365f80bcdb06b9da098f00.tar.gz
postgresql-87ce27de6963091f4a365f80bcdb06b9da098f00.zip
Ensure stored generated columns must be published when required.
Ensure stored generated columns that are part of REPLICA IDENTITY must be published explicitly for UPDATE and DELETE operations to be published. We can publish generated columns by listing them in the column list or by enabling the publish_generated_columns option. This commit changes the behavior of the test added in commit adedf54e65 by giving an ERROR for the UPDATE operation in such cases. There is no way to trigger the bug reported in commit adedf54e65 but we didn't remove the corresponding code change because it is still relevant when replicating changes from a publisher with version less than 18. We decided not to backpatch this behavior change to avoid the risk of breaking existing output plugins that may be sending generated columns by default although we are not aware of any such plugin. Also, we didn't see any reports related to this on STABLE branches which is another reason not to backpatch this change. Author: Shlok Kyal, Hou Zhijie Reviewed-by: Vignesh C, Amit Kapila Discussion: https://postgr.es/m/CANhcyEVw4V2Awe2AB6i0E5AJLNdASShGfdBLbUd1XtWDboymCA@mail.gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/create_publication.sgml8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/create_publication.sgml b/doc/src/sgml/ref/create_publication.sgml
index f8e217d6610..5e25536554a 100644
--- a/doc/src/sgml/ref/create_publication.sgml
+++ b/doc/src/sgml/ref/create_publication.sgml
@@ -312,6 +312,14 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
</para>
<para>
+ The generated columns that are part of <literal>REPLICA IDENTITY</literal>
+ must be published explicitly either by listing them in the column list or
+ by enabling the <literal>publish_generated_columns</literal> option, in
+ order for <command>UPDATE</command> and <command>DELETE</command> operations
+ to be published.
+ </para>
+
+ <para>
The row filter on a table becomes redundant if
<literal>FOR TABLES IN SCHEMA</literal> is specified and the table
belongs to the referred schema.