mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Replicate generated columns when specified in the column list.
This commit allows logical replication to publish and replicate generated columns when explicitly listed in the column list. We also ensured that the generated columns were copied during the initial tablesync when they were published. We will allow to replicate generated columns even when they are not specified in the column list (via a new publication option) in a separate commit. The motivation of this work is to allow replication for cases where the client doesn't have generated columns. For example, the case where one is trying to replicate data from Postgres to the non-Postgres database. Author: Shubham Khanna, Vignesh C, Hou Zhijie Reviewed-by: Peter Smith, Hayato Kuroda, Shlok Kyal, Amit Kapila Discussion: https://postgr.es/m/B80D17B2-2C8E-4C7D-87F2-E5B4BE3C069E@gmail.com
This commit is contained in:
@ -6544,7 +6544,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
|
||||
|
||||
<para>
|
||||
Next, the following message part appears for each column included in
|
||||
the publication (except generated columns):
|
||||
the publication:
|
||||
</para>
|
||||
|
||||
<variablelist>
|
||||
@ -7477,7 +7477,7 @@ psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
|
||||
</variablelist>
|
||||
|
||||
<para>
|
||||
Next, one of the following submessages appears for each column (except generated columns):
|
||||
Next, one of the following submessages appears for each column:
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
|
@ -89,7 +89,8 @@ CREATE PUBLICATION <replaceable class="parameter">name</replaceable>
|
||||
|
||||
<para>
|
||||
When a column list is specified, only the named columns are replicated.
|
||||
If no column list is specified, all columns of the table 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 <literal>TRUNCATE</literal> commands. See
|
||||
<xref linkend="logical-replication-col-lists"/> for details about column
|
||||
|
Reference in New Issue
Block a user