Allow logical replication to copy tables in binary format.
authorAmit Kapila <[email protected]>
Thu, 23 Mar 2023 03:15:51 +0000 (08:45 +0530)
committerAmit Kapila <[email protected]>
Thu, 23 Mar 2023 03:15:51 +0000 (08:45 +0530)
commitecb696527c01908d54b7a7aa2bd9179585b46459
treedb61bab00788f7b3ab46d2558102095fdb11676c
parent4f1882b960596c35d62c78fb44e14913eff49a85
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
doc/src/sgml/logical-replication.sgml
doc/src/sgml/ref/alter_subscription.sgml
doc/src/sgml/ref/create_subscription.sgml
src/backend/replication/logical/tablesync.c
src/test/subscription/t/014_binary.pl