pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Logical replication support for TRUNCATE
Date: Sat, 07 Apr 2018 15:43:53 +0000
Message-ID: <E1f4q0P-0007jQ-9y@gemulon.postgresql.org> (raw )
Logical replication support for TRUNCATE
Update the built-in logical replication system to make use of the
previously added logical decoding for TRUNCATE support. Add the
required truncate callback to pgoutput and a new logical replication
protocol message.
Publications get a new attribute to determine whether to replicate
truncate actions. When updating a publication via pg_dump from an older
version, this is not set, thus preserving the previous behavior.
Author: Simon Riggs <simon@2ndquadrant.com>
Author: Marco Nenciarini <marco.nenciarini@2ndquadrant.it>
Author: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Reviewed-by: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/039eb6e92f20499ac36cc74f8a5cef7430b706f6
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 8 ++
doc/src/sgml/logical-replication.sgml | 13 +--
doc/src/sgml/protocol.sgml | 56 ++++++++++
doc/src/sgml/ref/create_publication.sgml | 10 +-
src/backend/catalog/pg_publication.c | 1 +
src/backend/commands/publicationcmds.c | 20 +++-
src/backend/replication/logical/proto.c | 55 ++++++++++
src/backend/replication/logical/worker.c | 68 ++++++++++++
src/backend/replication/pgoutput/pgoutput.c | 129 +++++++++++++++-------
src/backend/utils/cache/relcache.c | 3 +-
src/bin/pg_dump/pg_dump.c | 33 ++++--
src/bin/pg_dump/pg_dump.h | 1 +
src/bin/pg_dump/t/002_pg_dump.pl | 2 +-
src/bin/psql/describe.c | 26 ++++-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_publication.h | 7 +-
src/include/replication/logicalproto.h | 4 +
src/test/regress/expected/publication.out | 84 +++++++--------
src/test/subscription/t/010_truncate.pl | 161 ++++++++++++++++++++++++++++
19 files changed, 572 insertions(+), 111 deletions(-)
view thread (3+ messages) latest in thread
Message-ID: <E1f4q0P-0007jQ-9y@gemulon.postgresql.org>
Permalink: ../E1f4q0P-0007jQ-9y@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1f4q0P-0007jQ-9y@gemulon.postgresql.org
copy link · copy postgr.es
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_e@gmx.net
Subject: Re: pgsql: Logical replication support for TRUNCATE
In-Reply-To: <E1f4q0P-0007jQ-9y@gemulon.postgresql.org>
References: <E1f4q0P-0007jQ-9y@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