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

From shiy.fnst@fujitsu.com
Subject RE: Allow logical replication to copy tables in binary format
Date
Msg-id OSZPR01MB63106EB081EADFF43C10442FFDBC9@OSZPR01MB6310.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Allow logical replication to copy tables in binary format  (Melih Mutlu <m.melihmutlu@gmail.com>)
List pgsql-hackers
On Thu, Mar 16, 2023 2:26 AM Melih Mutlu <m.melihmutlu@gmail.com> wrote:
> 
> Right, it needs to be ordered. Fixed.
> 

Hi,

Thanks for updating the patch. I tested some cases like toast data, combination
of row filter and column lists, and it works well.

Here is a comment:

+# Ensure the COPY command is executed in binary format on the publisher
+$node_publisher->wait_for_log(qr/LOG: ( [a-z0-9]+:)? COPY (.+)? TO STDOUT WITH \(FORMAT binary\)/);

The test failed with `log_error_verbosity = verbose` because it couldn't match
the following log:
2023-03-16 09:45:50.096 CST [2499415] pg_16398_sync_16391_7210954376230900539 LOG:  00000: statement: COPY
public.test_arrays(a, b, c) TO STDOUT WITH (FORMAT binary)
 

I think we should make it pass, see commit 19408aae7f.
Should it be changed to:

$node_publisher->wait_for_log(qr/LOG: ( [A-Z0-9]+:)? statement: COPY (.+)? TO STDOUT WITH \(FORMAT binary\)/);

Besides, for the same reason, this line also needs to be modified.
+$node_publisher->wait_for_log(qr/LOG: ( [a-z0-9]+:)? COPY (.+)? TO STDOUT\n/);

Regards,
Shi Yu

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: "current directory" in a server error message
Next
From: "wangw.fnst@fujitsu.com"
Date:
Subject: RE: Support logical replication of DDLs