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 decoding of TRUNCATE
Date: Sat, 07 Apr 2018 15:43:53 +0000
Message-ID: <E1f4q0P-0007jP-9z@gemulon.postgresql.org> (raw)

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@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/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(-)



Message-ID: <E1f4q0P-0007jP-9z@gemulon.postgresql.org>
Permalink:  ../E1f4q0P-0007jP-9z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1f4q0P-0007jP-9z@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_e@gmx.net
  Subject: Re: pgsql: Logical decoding of TRUNCATE
  In-Reply-To: <E1f4q0P-0007jP-9z@gemulon.postgresql.org>
  References: <E1f4q0P-0007jP-9z@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