[PATCH] Logical decoding of TRUNCATE

From: Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Logical decoding of TRUNCATE
Date: 2017-12-29 13:15:22
Message-ID: 269bf0d2-6ac4-c032-6979-22aad6a9f5fb@2ndquadrant.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Hi,

This patch implements support for TRUNCATE statements
in logical replication. The work has mainly done by Simon Riggs then
finished by me. Tests are written by me.

TRUNCATE is treated as a form of DELETE for the purpose of deciding
whether to publish, or not.

The "TRUNCATE behavior when session_replication_role = replica"[1] patch
is required from this patch to work correctly with tables referenced by
foreign keys.

[1] https://commitfest.postgresql.org/16/1447/

Regards,
Marco

--
Marco Nenciarini - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
marco(dot)nenciarini(at)2ndQuadrant(dot)it | www.2ndQuadrant.it

Attachment Content-Type Size
logical_decode_truncate.v10.patch text/plain 53.1 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message mark 2017-12-29 13:21:09 postgresql9.5 partition table
Previous Message Michael Paquier 2017-12-29 11:53:54 Re: pool connection

Browse pgsql-hackers by date

  From Date Subject
Next Message Vladimir Svedov 2017-12-29 13:57:33 array_ndims never returns zero
Previous Message Tels 2017-12-29 13:12:26 Re: TAP test module - PostgresClient