Re: Allow logical replication to copy tables in binary format - Mailing list pgsql-hackers

From Melih Mutlu
Subject Re: Allow logical replication to copy tables in binary format
Date
Msg-id CAGPVpCTaXYctCUp3z=_BstonHiZcC5Jj7584i7B8jeZQq4RJkw@mail.gmail.com
Whole thread Raw
In response to RE: Allow logical replication to copy tables in binary format  ("Takamichi Osumi (Fujitsu)" <osumi.takamichi@fujitsu.com>)
Responses Re: Allow logical replication to copy tables in binary format
List pgsql-hackers
Hi,

Please see the attached patch.

Takamichi Osumi (Fujitsu) <osumi.takamichi@fujitsu.com>, 14 Mar 2023 Sal, 18:20 tarihinde şunu yazdı:
(1) create_subscription.sgml

+          column types as opposed to text format. Even when this option is enabled,
+          only data types having binary send and receive functions will be
+          transferred in binary. Note that the initial synchronization requires

(1-1)

I think it's helpful to add a reference for the description about send and receive functions (e.g. to the page of CREATE TYPE).

Done.
 

(1-2)

Also, it would be better to have a cross reference from there to this doc as one paragraph probably in "Notes". I suggested this, because send and receive functions are described as "optional" there and missing them leads to error in the context of binary table synchronization.

I'm not sure whether this is necessary. In case of missing send/receive functions, error logs are already clear about what's wrong and logical replication docs also explain what could go wrong with binary.
 
(3) copy_table()

+       /*
+        * If the publisher version is earlier than v14, it COPY command doesn't
+        * support the binary option.
+        */

This sentence doesn't look correct grammatically. We can replace "it COPY command" with "subscription" for example. Kindly please fix it.

Changed this with Amit's suggestion [1].



Thanks,
--
Melih Mutlu
Microsoft
Attachment

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: CI and test improvements
Next
From: Melih Mutlu
Date:
Subject: Re: Allow logical replication to copy tables in binary format