]> granicus.if.org Git - postgresql/commit
Logical replication support for TRUNCATE
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 7 Apr 2018 15:24:53 +0000 (11:24 -0400)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 7 Apr 2018 15:34:11 +0000 (11:34 -0400)
commit039eb6e92f20499ac36cc74f8a5cef7430b706f6
tree2cf52aeafb59917d5c7ed396acb6d86325b4a8b0
parent5dfd1e5a6696b271a2cdee54143fbc209c88c02f
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>
19 files changed:
doc/src/sgml/catalogs.sgml
doc/src/sgml/logical-replication.sgml
doc/src/sgml/protocol.sgml
doc/src/sgml/ref/create_publication.sgml
src/backend/catalog/pg_publication.c
src/backend/commands/publicationcmds.c
src/backend/replication/logical/proto.c
src/backend/replication/logical/worker.c
src/backend/replication/pgoutput/pgoutput.c
src/backend/utils/cache/relcache.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/t/002_pg_dump.pl
src/bin/psql/describe.c
src/include/catalog/catversion.h
src/include/catalog/pg_publication.h
src/include/replication/logicalproto.h
src/test/regress/expected/publication.out
src/test/subscription/t/010_truncate.pl [new file with mode: 0644]