pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Prepare to support non-tables in publications
Date: Thu, 19 Mar 2020 08:04:42 +0000
Message-ID: <E1jEqAU-0005vJ-Rj@gemulon.postgresql.org> (raw)

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....

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c314c147c0563c9758bdad988ffda8d64daa2db6

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 36 +++++++++++++++++++++--------
src/include/replication/logicalproto.h      |  1 +
2 files changed, 28 insertions(+), 9 deletions(-)



Message-ID: <E1jEqAU-0005vJ-Rj@gemulon.postgresql.org>
Permalink:  ../E1jEqAU-0005vJ-Rj@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1jEqAU-0005vJ-Rj@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Prepare to support non-tables in publications
  In-Reply-To: <E1jEqAU-0005vJ-Rj@gemulon.postgresql.org>
  References: <E1jEqAU-0005vJ-Rj@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox