RE: Truncate in synchronous logical replication failed

2021-04-27 Thread tanghy.f...@fujitsu.com
On Tuesday, April 27, 2021 1:17 PM, Amit Kapila wrote >Seeing no other suggestions, I have pushed this in HEAD only. Thanks! Sorry for the later reply on this issue. I tested with the latest HEAD, the issue is fixed now. Thanks a lot. Regards Tang

Re: Truncate in synchronous logical replication failed

2021-04-26 Thread Amit Kapila
On Mon, Apr 26, 2021 at 12:37 PM Japin Li wrote: > > On Mon, 26 Apr 2021 at 12:49, Amit Kapila wrote: > > On Fri, Apr 23, 2021 at 7:18 PM osumi.takami...@fujitsu.com > > wrote: > >> > > > > The latest patch looks good to me. I have made a minor modification > > and added a commit message in the

Re: Truncate in synchronous logical replication failed

2021-04-26 Thread Japin Li
On Mon, 26 Apr 2021 at 12:49, Amit Kapila wrote: > On Fri, Apr 23, 2021 at 7:18 PM osumi.takami...@fujitsu.com > wrote: >> > > The latest patch looks good to me. I have made a minor modification > and added a commit message in the attached. I would like to once again > ask whether anybody else

RE: Truncate in synchronous logical replication failed

2021-04-26 Thread osumi.takami...@fujitsu.com
On Monday, April 26, 2021 1:50 PM Amit Kapila wrote: > On Fri, Apr 23, 2021 at 7:18 PM osumi.takami...@fujitsu.com > wrote: > > > > The latest patch looks good to me. I have made a minor modification and > added a commit message in the attached. Thank you for updating the patch. I think we

Re: Truncate in synchronous logical replication failed

2021-04-25 Thread Amit Kapila
On Fri, Apr 23, 2021 at 7:18 PM osumi.takami...@fujitsu.com wrote: > The latest patch looks good to me. I have made a minor modification and added a commit message in the attached. I would like to once again ask whether anybody else thinks we should backpatch this? Just a summary for anybody not

RE: Truncate in synchronous logical replication failed

2021-04-23 Thread osumi.takami...@fujitsu.com
On Friday, April 23, 2021 6:03 PM I wrote: > I've combined v5 with above accepted comments. > > Just in case, I've conducted make check-world, the test of > clobber_cache_always mode again for v6 and tight loop test of 100 times for > 010_truncate.pl. > The result is that all passed with no

RE: Truncate in synchronous logical replication failed

2021-04-23 Thread osumi.takami...@fujitsu.com
On Friday, April 23, 2021 3:43 PM Amit Kapila wrote: > On Fri, Apr 23, 2021 at 12:04 PM osumi.takami...@fujitsu.com > wrote: > > > > On Thursday, April 22, 2021 6:33 PM Amit Kapila > wrote: > > > On Tue, Apr 20, 2021 at 9:00 AM osumi.takami...@fujitsu.com > > > wrote: > > > > > > > > On

Re: Truncate in synchronous logical replication failed

2021-04-23 Thread Amit Kapila
On Fri, Apr 23, 2021 at 12:04 PM osumi.takami...@fujitsu.com wrote: > > On Thursday, April 22, 2021 6:33 PM Amit Kapila > wrote: > > On Tue, Apr 20, 2021 at 9:00 AM osumi.takami...@fujitsu.com > > wrote: > > > > > > On Tuesday, April 20, 2021 10:53 AM Ajin Cherian > > wrote: > > > > > > > >

RE: Truncate in synchronous logical replication failed

2021-04-23 Thread osumi.takami...@fujitsu.com
On Thursday, April 22, 2021 6:33 PM Amit Kapila wrote: > On Tue, Apr 20, 2021 at 9:00 AM osumi.takami...@fujitsu.com > wrote: > > > > On Tuesday, April 20, 2021 10:53 AM Ajin Cherian > wrote: > > > > > > I reviewed the patch, ran make check, no issues. One minor comment: > > > > > > Could you

RE: Truncate in synchronous logical replication failed

2021-04-22 Thread shiy.f...@fujitsu.com
> I don't think here we need to restart to get a stable list of indexes > as we do in RelationGetIndexAttrBitmap. The reason is here we build > the cache entry using a historic snapshot and all the later changes > are absorbed while decoding WAL. I have updated that and modified few > comments in

Re: Truncate in synchronous logical replication failed

2021-04-22 Thread Amit Kapila
On Tue, Apr 20, 2021 at 9:00 AM osumi.takami...@fujitsu.com wrote: > > On Tuesday, April 20, 2021 10:53 AM Ajin Cherian wrote: > > > > I reviewed the patch, ran make check, no issues. One minor comment: > > > > Could you add the comment similar to RelationGetIndexAttrBitmap() on why > > the

RE: Truncate in synchronous logical replication failed

2021-04-19 Thread osumi.takami...@fujitsu.com
On Tuesday, April 20, 2021 10:53 AM Ajin Cherian wrote: > On Sat, Apr 17, 2021 at 2:04 PM osumi.takami...@fujitsu.com > > wrote: > > No problem. Thank you for updating the patch. > I've conducted some

Re: Truncate in synchronous logical replication failed

2021-04-19 Thread Ajin Cherian
On Sat, Apr 17, 2021 at 2:04 PM osumi.takami...@fujitsu.com < osumi.takami...@fujitsu.com> wrote: > > No problem. Thank you for updating the patch. > I've conducted some cosmetic changes. Could you please check this ? > That's already applied by pgindent. > > I executed RT for this and made no

Re: Truncate in synchronous logical replication failed

2021-04-17 Thread Japin Li
On Sat, 17 Apr 2021 at 12:03, osumi.takami...@fujitsu.com wrote: > On Saturday, April 17, 2021 12:53 AM Japin Li >> On Fri, 16 Apr 2021 at 17:19, osumi.takami...@fujitsu.com >> wrote: >> > On Friday, April 16, 2021 5:50 PM Amit Kapila >> wrote: >> >> On Fri, Apr 16, 2021 at 12:56 PM

RE: Truncate in synchronous logical replication failed

2021-04-16 Thread osumi.takami...@fujitsu.com
On Saturday, April 17, 2021 12:53 AM Japin Li > On Fri, 16 Apr 2021 at 17:19, osumi.takami...@fujitsu.com > wrote: > > On Friday, April 16, 2021 5:50 PM Amit Kapila > wrote: > >> On Fri, Apr 16, 2021 at 12:56 PM osumi.takami...@fujitsu.com > >> wrote: > >> > > >> > > Thanks for your reminder.

Re: Truncate in synchronous logical replication failed

2021-04-16 Thread Japin Li
On Fri, 16 Apr 2021 at 17:19, osumi.takami...@fujitsu.com wrote: > Hi > > > On Friday, April 16, 2021 5:50 PM Amit Kapila wrote: >> On Fri, Apr 16, 2021 at 12:56 PM osumi.takami...@fujitsu.com >> wrote: >> > >> > > Thanks for your reminder. It might be a way to solve this problem. >> > Yeah.

Re: Truncate in synchronous logical replication failed

2021-04-16 Thread Amit Kapila
On Fri, Apr 16, 2021 at 3:08 PM Japin Li wrote: > > On Fri, 16 Apr 2021 at 16:52, Amit Kapila wrote: > > On Fri, Apr 16, 2021 at 12:55 PM Japin Li wrote: > > It is okay as POC but we can't change the existing function > > RelationGetIndexAttrBitmap. It is used from other places as well. It > >

Re: Truncate in synchronous logical replication failed

2021-04-16 Thread Japin Li
On Fri, 16 Apr 2021 at 16:52, Amit Kapila wrote: > On Fri, Apr 16, 2021 at 12:55 PM Japin Li wrote: >> >> On Thu, 15 Apr 2021 at 19:25, Amit Kapila wrote: >> > On Thu, Apr 15, 2021 at 4:30 PM Japin Li wrote: >> >> >> >> >> >> On Thu, 15 Apr 2021 at 18:22, Amit Kapila wrote: >> >> > On Wed,

RE: Truncate in synchronous logical replication failed

2021-04-16 Thread osumi.takami...@fujitsu.com
Hi On Friday, April 16, 2021 5:50 PM Amit Kapila wrote: > On Fri, Apr 16, 2021 at 12:56 PM osumi.takami...@fujitsu.com > wrote: > > > > > Thanks for your reminder. It might be a way to solve this problem. > > Yeah. I've made the 1st patch for this issue. > > > > In my env, with the patch > >

Re: Truncate in synchronous logical replication failed

2021-04-16 Thread Amit Kapila
On Fri, Apr 16, 2021 at 12:55 PM Japin Li wrote: > > On Thu, 15 Apr 2021 at 19:25, Amit Kapila wrote: > > On Thu, Apr 15, 2021 at 4:30 PM Japin Li wrote: > >> > >> > >> On Thu, 15 Apr 2021 at 18:22, Amit Kapila wrote: > >> > On Wed, Apr 14, 2021 at 3:31 PM Amit Kapila > >> > wrote: > >> >> >

Re: Truncate in synchronous logical replication failed

2021-04-16 Thread Amit Kapila
On Fri, Apr 16, 2021 at 12:56 PM osumi.takami...@fujitsu.com wrote: > > > Thanks for your reminder. It might be a way to solve this problem. > Yeah. I've made the 1st patch for this issue. > > In my env, with the patch > the TRUNCATE in synchronous logical replication doesn't hang. > Few

RE: Truncate in synchronous logical replication failed

2021-04-16 Thread osumi.takami...@fujitsu.com
Hi On Friday, April 16, 2021 11:02 AM Japin Li > On Thu, 15 Apr 2021 at 19:25, Amit Kapila wrote: > > On Thu, Apr 15, 2021 at 4:30 PM Japin Li wrote: > >> > >> > >> On Thu, 15 Apr 2021 at 18:22, Amit Kapila > wrote: > >> > On Wed, Apr 14, 2021 at 3:31 PM Amit Kapila > wrote: > >> >> > >> >>

Re: Truncate in synchronous logical replication failed

2021-04-16 Thread Japin Li
On Thu, 15 Apr 2021 at 19:25, Amit Kapila wrote: > On Thu, Apr 15, 2021 at 4:30 PM Japin Li wrote: >> >> >> On Thu, 15 Apr 2021 at 18:22, Amit Kapila wrote: >> > On Wed, Apr 14, 2021 at 3:31 PM Amit Kapila >> > wrote: >> >> >> >> On Tue, Apr 13, 2021 at 8:07 PM Petr Jelinek >> >> wrote: >>

Re: Truncate in synchronous logical replication failed

2021-04-15 Thread Japin Li
On Thu, 15 Apr 2021 at 19:25, Amit Kapila wrote: > On Thu, Apr 15, 2021 at 4:30 PM Japin Li wrote: >> >> >> On Thu, 15 Apr 2021 at 18:22, Amit Kapila wrote: >> > On Wed, Apr 14, 2021 at 3:31 PM Amit Kapila >> > wrote: >> >> >> >> On Tue, Apr 13, 2021 at 8:07 PM Petr Jelinek >> >> wrote: >>

Re: Truncate in synchronous logical replication failed

2021-04-15 Thread Amit Kapila
On Thu, Apr 15, 2021 at 4:30 PM Japin Li wrote: > > > On Thu, 15 Apr 2021 at 18:22, Amit Kapila wrote: > > On Wed, Apr 14, 2021 at 3:31 PM Amit Kapila wrote: > >> > >> On Tue, Apr 13, 2021 at 8:07 PM Petr Jelinek > >> wrote: > >> > > >> > > On 12 Apr 2021, at 08:58, Amit Kapila wrote: > >> >

Re: Truncate in synchronous logical replication failed

2021-04-15 Thread Japin Li
On Thu, 15 Apr 2021 at 18:22, Amit Kapila wrote: > On Wed, Apr 14, 2021 at 3:31 PM Amit Kapila wrote: >> >> On Tue, Apr 13, 2021 at 8:07 PM Petr Jelinek >> wrote: >> > >> > > On 12 Apr 2021, at 08:58, Amit Kapila wrote: >> > > >> > > The problem happens only when we try to fetch IDENTITY_KEY

Re: Truncate in synchronous logical replication failed

2021-04-15 Thread Amit Kapila
On Wed, Apr 14, 2021 at 3:31 PM Amit Kapila wrote: > > On Tue, Apr 13, 2021 at 8:07 PM Petr Jelinek > wrote: > > > > > On 12 Apr 2021, at 08:58, Amit Kapila wrote: > > > > > > The problem happens only when we try to fetch IDENTITY_KEY attributes > > > because pgoutput uses

Re: Truncate in synchronous logical replication failed

2021-04-14 Thread Amit Kapila
On Tue, Apr 13, 2021 at 8:07 PM Petr Jelinek wrote: > > > On 12 Apr 2021, at 08:58, Amit Kapila wrote: > > > > The problem happens only when we try to fetch IDENTITY_KEY attributes > > because pgoutput uses RelationGetIndexAttrBitmap() to get that > > information which locks the required

RE: Truncate in synchronous logical replication failed

2021-04-14 Thread osumi.takami...@fujitsu.com
On Wednesday, April 14, 2021 11:38 AM Japin Li wrote: > On Tue, 13 Apr 2021 at 21:54, osumi.takami...@fujitsu.com > wrote: > > On Monday, April 12, 2021 3:58 PM Amit Kapila > wrote: > >> On Mon, Apr 12, 2021 at 10:03 AM osumi.takami...@fujitsu.com > >> wrote: > >> > but if we take a measure to

RE: Truncate in synchronous logical replication failed

2021-04-14 Thread osumi.takami...@fujitsu.com
On Tuesday, April 13, 2021 11:38 PM Petr Jelinek wrote: > > On 12 Apr 2021, at 08:58, Amit Kapila wrote: > > On Mon, Apr 12, 2021 at 10:03 AM osumi.takami...@fujitsu.com > > wrote: > >> > >>> I checked the PG-DOC, found it says that “Replication of TRUNCATE > >>> commands is supported”[1], so

Re: Truncate in synchronous logical replication failed

2021-04-13 Thread Japin Li
On Tue, 13 Apr 2021 at 21:54, osumi.takami...@fujitsu.com wrote: > On Monday, April 12, 2021 3:58 PM Amit Kapila wrote: >> On Mon, Apr 12, 2021 at 10:03 AM osumi.takami...@fujitsu.com >> wrote: >> > but if we take a measure to fix the doc, we have to be careful for the >> > description,

Re: Truncate in synchronous logical replication failed

2021-04-13 Thread Petr Jelinek
> On 12 Apr 2021, at 08:58, Amit Kapila wrote: > > On Mon, Apr 12, 2021 at 10:03 AM osumi.takami...@fujitsu.com > wrote: >> >>> I checked the PG-DOC, found it says that “Replication of TRUNCATE >>> commands is supported”[1], so maybe TRUNCATE is not supported in >>> synchronous logical

RE: Truncate in synchronous logical replication failed

2021-04-13 Thread osumi.takami...@fujitsu.com
On Monday, April 12, 2021 3:58 PM Amit Kapila wrote: > On Mon, Apr 12, 2021 at 10:03 AM osumi.takami...@fujitsu.com > wrote: > > but if we take a measure to fix the doc, we have to be careful for the > > description, because when we remove the primary keys of 'test' tables on the > scenario in

Re: Truncate in synchronous logical replication failed

2021-04-12 Thread Amit Kapila
On Mon, Apr 12, 2021 at 10:03 AM osumi.takami...@fujitsu.com wrote: > > > I checked the PG-DOC, found it says that “Replication of TRUNCATE > > commands is supported”[1], so maybe TRUNCATE is not supported in > > synchronous logical replication? > > > > If my understanding is right, maybe PG-DOC

RE: Truncate in synchronous logical replication failed

2021-04-11 Thread osumi.takami...@fujitsu.com
Hi On Saturday, April 10, 2021 11:52 PM Japin Li wrote: > On Thu, 08 Apr 2021 at 19:20, Japin Li wrote: > > On Wed, 07 Apr 2021 at 16:34, tanghy.f...@fujitsu.com > wrote: > >> On Wednesday, April 7, 2021 5:28 PM Amit Kapila > >> wrote > >> > >>>Can you please check if the behavior is the

Re: Truncate in synchronous logical replication failed

2021-04-10 Thread Japin Li
On Thu, 08 Apr 2021 at 19:20, Japin Li wrote: > On Wed, 07 Apr 2021 at 16:34, tanghy.f...@fujitsu.com > wrote: >> On Wednesday, April 7, 2021 5:28 PM Amit Kapila >> wrote >> >>>Can you please check if the behavior is the same for PG-13? This is >>>just to ensure that we have not introduced

Re: Truncate in synchronous logical replication failed

2021-04-08 Thread Japin Li
On Wed, 07 Apr 2021 at 16:34, tanghy.f...@fujitsu.com wrote: > On Wednesday, April 7, 2021 5:28 PM Amit Kapila > wrote > >>Can you please check if the behavior is the same for PG-13? This is >>just to ensure that we have not introduced any bug in PG-14. > > Yes, same failure happens at

RE: Truncate in synchronous logical replication failed

2021-04-07 Thread tanghy.f...@fujitsu.com
On Wednesday, April 7, 2021 5:28 PM Amit Kapila wrote >Can you please check if the behavior is the same for PG-13? This is >just to ensure that we have not introduced any bug in PG-14. Yes, same failure happens at PG-13, too. Regards, Tang

Re: Truncate in synchronous logical replication failed

2021-04-07 Thread Amit Kapila
On Wed, Apr 7, 2021 at 12:26 PM tanghy.f...@fujitsu.com wrote: > > Hi > > I met a problem in synchronous logical replication. The client hangs when > TRUNCATE TABLE at publisher. > Can you please check if the behavior is the same for PG-13? This is just to ensure that we have not introduced any