Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-15 Thread Amit Kapila
On Sat, Feb 13, 2021 at 10:56 AM Amit Kapila wrote: > > On Sat, Feb 13, 2021 at 9:49 AM Tom Lane wrote: > > > > Amit Kapila writes: > > > Attached should fix the reported warnings but as I am not getting > > > those warnings on my system so can't confirm but otherwise, the patch > > > works as e

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Amit Kapila
On Sat, Feb 13, 2021 at 9:49 AM Tom Lane wrote: > > Amit Kapila writes: > > Attached should fix the reported warnings but as I am not getting > > those warnings on my system so can't confirm but otherwise, the patch > > works as expected. I am planning to push this unless you or Peter have > > an

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Tom Lane
Amit Kapila writes: > Attached should fix the reported warnings but as I am not getting > those warnings on my system so can't confirm but otherwise, the patch > works as expected. I am planning to push this unless you or Peter have > any comments. Personally I'd get rid of the option for Replica

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Amit Kapila
On Sat, Feb 13, 2021 at 6:47 AM Amit Kapila wrote: > > On Sat, Feb 13, 2021 at 4:20 AM Tom Lane wrote: > > > > Don't do that. Quite aside from the inconsistency, this is pretty > > darn unsafe coding technique, because there is exactly nothing > > guaranteeing that the caller passes a buffer of

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Tom Lane
Amit Kapila writes: > Thanks for pointing it out. I'll look into this. BTW, how one can > check such reports, do one need to check all make logs for buildfarm > members? Yeah, I have a script that scans the most recent buildfarm runs for compiler warnings. I run it every few weeks typically (it'

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Amit Kapila
On Sat, Feb 13, 2021 at 4:20 AM Tom Lane wrote: > > Don't do that. Quite aside from the inconsistency, this is pretty > darn unsafe coding technique, because there is exactly nothing > guaranteeing that the caller passes a buffer of the length the > function expects. > > I'm not real sure that yo

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-12 Thread Tom Lane
Various buildfarm members are complaining about this patch, eg caiman| 2021-02-12 15:00:19 | tablesync.c:885:70: warning: argument 3 of type 'char[64]' with mismatched bound [-Warray-parameter=] caiman| 2021-02-12 15:00:19 | tablesync.c:904:72: warning: argument 3 of type 'char

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
On Fri, Feb 12, 2021 at 9:00 AM Amit Kapila wrote: > > On Fri, Feb 12, 2021 at 8:47 AM Tom Lane wrote: > > > > Amit Kapila writes: > > > I noticed one failure: > > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A28%3A12 > > > Checking the same. > > > > I

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
On Fri, Feb 12, 2021 at 8:47 AM Tom Lane wrote: > > Amit Kapila writes: > > I noticed one failure: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A28%3A12 > > Checking the same. > > I think thorntail runs with nondefault prevailing wal_level, might be >

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
On Fri, Feb 12, 2021 at 8:23 AM Amit Kapila wrote: > > On Fri, Feb 12, 2021 at 7:50 AM Amit Kapila wrote: > > > > Allow multiple xacts during table sync in logical replication. > > > > I noticed one failure: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Tom Lane
Amit Kapila writes: > I noticed one failure: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A28%3A12 > Checking the same. I think thorntail runs with nondefault prevailing wal_level, might be related. regards, tom lane

Re: pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
On Fri, Feb 12, 2021 at 7:50 AM Amit Kapila wrote: > > Allow multiple xacts during table sync in logical replication. > I noticed one failure: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=thorntail&dt=2021-02-12%2002%3A28%3A12 Checking the same. -- With Regards, Amit Kapila.

pgsql: Allow multiple xacts during table sync in logical replication.

2021-02-11 Thread Amit Kapila
Allow multiple xacts during table sync in logical replication. For the initial table data synchronization in logical replication, we use a single transaction to copy the entire table and then synchronize the position in the stream with the main apply worker. There are multiple downsides of this a