pgsql: Allow logical replication to copy tables in binary format.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow logical replication to copy tables in binary format.
Date: 2023-03-23 03:21:57
Message-ID: E1pfBWW-004vSl-Js@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow logical replication to copy tables in binary format.

This patch allows copying tables in the binary format during table
synchronization when the binary option for a subscription is enabled.
Previously, tables are copied in text format even if the subscription is
created with the binary option enabled. Copying tables in binary format
may reduce the time spent depending on column types.

A binary copy for initial table synchronization is supported only when
both publisher and subscriber are v16 or later.

Author: Melih Mutlu
Reviewed-by: Peter Smith, Shi yu, Euler Taveira, Vignesh C, Kuroda Hayato, Osumi Takamichi, Bharath Rupireddy, Hou Zhijie
Discussion: https://postgr.es/m/CAGPVpCQvAziCLknEnygY0v1-KBtg%2BOm-9JHJYZOnNPKFJPompw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ecb696527c01908d54b7a7aa2bd9179585b46459

Modified Files
--------------
doc/src/sgml/logical-replication.sgml | 4 +-
doc/src/sgml/ref/alter_subscription.sgml | 5 +
doc/src/sgml/ref/create_subscription.sgml | 28 ++++-
src/backend/replication/logical/tablesync.c | 17 ++-
src/test/subscription/t/014_binary.pl | 180 ++++++++++++++++++++++++++--
5 files changed, 216 insertions(+), 18 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2023-03-23 06:43:37 pgsql: Ignore generated columns during apply of update/delete.
Previous Message Michael Paquier 2023-03-23 02:51:44 pgsql: Improve a bit the tests of pg_walinspect