From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Logical decoding of TRUNCATE |
Date: | 2018-04-07 15:43:53 |
Message-ID: | E1f4q0P-0007jP-9z@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Logical decoding of TRUNCATE
Add a new WAL record type for TRUNCATE, which is only used when
wal_level >= logical. (For physical replication, TRUNCATE is already
replicated via SMGR records.) Add new callback for logical decoding
output plugins to receive TRUNCATE actions.
Author: Simon Riggs <simon(at)2ndquadrant(dot)com>
Author: Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>
Author: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Reviewed-by: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5dfd1e5a6696b271a2cdee54143fbc209c88c02f
Modified Files
--------------
contrib/test_decoding/Makefile | 2 +-
contrib/test_decoding/expected/truncate.out | 25 ++++++
contrib/test_decoding/sql/truncate.sql | 10 +++
contrib/test_decoding/test_decoding.c | 58 +++++++++++++
doc/src/sgml/logicaldecoding.sgml | 27 +++++-
src/backend/access/heap/heapam.c | 7 ++
src/backend/access/rmgrdesc/heapdesc.c | 16 ++++
src/backend/commands/tablecmds.c | 104 ++++++++++++++++++++++--
src/backend/replication/logical/decode.c | 41 ++++++++++
src/backend/replication/logical/logical.c | 43 ++++++++++
src/backend/replication/logical/reorderbuffer.c | 35 ++++++++
src/include/access/heapam_xlog.h | 23 +++++-
src/include/commands/tablecmds.h | 2 +
src/include/replication/output_plugin.h | 10 +++
src/include/replication/reorderbuffer.h | 24 +++++-
15 files changed, 414 insertions(+), 13 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-04-07 16:01:51 | Re: pgsql: Logical replication support for TRUNCATE |
Previous Message | Teodor Sigaev | 2018-04-07 13:59:36 | pgsql: Predicate locking in hash indexes. |