mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Prepare to support non-tables in publications
This by itself doesn't change any functionality but prepares the way for having relations other than base tables in publications. Make arrangements for COPY handling the initial table sync. For non-tables we have to use COPY (SELECT ...) instead of directly copying from the table, but then we have to take care to omit generated columns from the column list. Also, remove a hardcoded reference to relkind = 'r' and rely on the publisher to send only what it can actually publish, which will be correct even in future cross-version scenarios. Reviewed-by: Amit Langote <amitlangote09@gmail.com> Discussion: https://www.postgresql.org/message-id/flat/CA+HiwqH=Y85vRK3mOdjEkqFK+E=ST=eQiHdpj43L=_eJMOOznQ@mail.gmail.com
This commit is contained in:
@@ -49,6 +49,7 @@ typedef struct LogicalRepRelation
|
||||
char **attnames; /* column names */
|
||||
Oid *atttyps; /* column types */
|
||||
char replident; /* replica identity */
|
||||
char relkind; /* remote relation kind */
|
||||
Bitmapset *attkeys; /* Bitmap of key columns */
|
||||
} LogicalRepRelation;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user