Re: Problem with synchronous replication

2019-11-01 Thread Michael Paquier
On Thu, Oct 31, 2019 at 05:38:32PM +0900, Fujii Masao wrote: > Thanks for the patch! Looks good to me. Thanks. I have applied the core fix down to 9.4, leaving the new assertion improvements only for HEAD. -- Michael signature.asc Description: PGP signature

Re: Problem with synchronous replication

2019-10-31 Thread lingce.ldm
On Oct 31, 2019, at 10:11, Michael Paquier wrote: > > On Wed, Oct 30, 2019 at 05:43:04PM +0900, Kyotaro Horiguchi wrote: >> At Wed, 30 Oct 2019 17:21:17 +0900, Fujii Masao >> wrote in >>> This change causes every ending backends to always take the exclusive lock >>> even when it's not in SyncR

Re: Problem with synchronous replication

2019-10-31 Thread Fujii Masao
On Thu, Oct 31, 2019 at 11:12 AM Michael Paquier wrote: > > On Wed, Oct 30, 2019 at 05:43:04PM +0900, Kyotaro Horiguchi wrote: > > At Wed, 30 Oct 2019 17:21:17 +0900, Fujii Masao > > wrote in > >> This change causes every ending backends to always take the exclusive lock > >> even when it's not

Re: Problem with synchronous replication

2019-10-30 Thread Michael Paquier
On Wed, Oct 30, 2019 at 05:43:04PM +0900, Kyotaro Horiguchi wrote: > At Wed, 30 Oct 2019 17:21:17 +0900, Fujii Masao wrote > in >> This change causes every ending backends to always take the exclusive lock >> even when it's not in SyncRep queue. This may be problematic, for example, >> when term

Re: Problem with synchronous replication

2019-10-30 Thread Michael Paquier
On Wed, Oct 30, 2019 at 12:34:28PM +0900, Kyotaro Horiguchi wrote: > If we do that strictly, other functions like > SyncRepGetOldestSyncRecPtr need the same Assert()s. I think static > functions don't need Assert() and caution in their comments would be > enough. Perhaps. I'd rather be careful th

Re: Problem with synchronous replication

2019-10-30 Thread Michael Paquier
On Wed, Oct 30, 2019 at 05:21:17PM +0900, Fujii Masao wrote: > This change causes every ending backends to always take the exclusive lock > even when it's not in SyncRep queue. This may be problematic, for example, > when terminating multiple backends at the same time? If yes, > it might be better

Re: Problem with synchronous replication

2019-10-30 Thread Kyotaro Horiguchi
Hello. At Wed, 30 Oct 2019 17:21:17 +0900, Fujii Masao wrote in > This change causes every ending backends to always take the exclusive lock > even when it's not in SyncRep queue. This may be problematic, for example, > when terminating multiple backends at the same time? If yes, > it might be

Re: Problem with synchronous replication

2019-10-30 Thread Fujii Masao
On Wed, Oct 30, 2019 at 4:16 PM lingce.ldm wrote: > > On Oct 29, 2019, at 18:50, Kyotaro Horiguchi wrote: > > > Hello. > > At Fri, 25 Oct 2019 15:18:34 +0800, "Dongming Liu" > wrote in > > > Hi, > > I recently discovered two possible bugs about synchronous replication. > > 1. SyncRepCleanupAtPr

Re: Problem with synchronous replication

2019-10-30 Thread lingce . ldm
On Oct 30, 2019, at 09:45, Michael Paquier mailto:mich...@paquier.xyz>> wrote: > > On Tue, Oct 29, 2019 at 07:50:01PM +0900, Kyotaro Horiguchi wrote: >> At Fri, 25 Oct 2019 15:18:34 +0800, "Dongming Liu" >> wrote in >>> I recently discovered two possible bugs about synchronous replication. >>>

Re: Problem with synchronous replication

2019-10-30 Thread lingce . ldm
On Oct 29, 2019, at 18:50, Kyotaro Horiguchi mailto:horikyota@gmail.com>> wrote: > > Hello. > > At Fri, 25 Oct 2019 15:18:34 +0800, "Dongming Liu" > mailto:lingce@alibaba-inc.com>> wrote in >> >> Hi, >> >> I recently discovered two possible bugs about synchronous replication. >> >> 1

Re: Problem with synchronous replication

2019-10-29 Thread Dongming Liu
On Wed, Oct 30, 2019 at 9:12 AM Michael Paquier wrote: > On Tue, Oct 29, 2019 at 01:40:41PM +0800, Dongming Liu wrote: > > Can someone help me to confirm that these two problems are bugs? > > If they are bugs, please help review the patch or provide better fix > > suggestions. > > There is no nee

Re: Problem with synchronous replication

2019-10-29 Thread Kyotaro Horiguchi
At Wed, 30 Oct 2019 10:45:11 +0900, Michael Paquier wrote in > On Tue, Oct 29, 2019 at 07:50:01PM +0900, Kyotaro Horiguchi wrote: > > At Fri, 25 Oct 2019 15:18:34 +0800, "Dongming Liu" > > wrote in > >> I recently discovered two possible bugs about synchronous replication. > >> > >> 1. SyncR

Re: Problem with synchronous replication

2019-10-29 Thread Michael Paquier
On Tue, Oct 29, 2019 at 07:50:01PM +0900, Kyotaro Horiguchi wrote: > At Fri, 25 Oct 2019 15:18:34 +0800, "Dongming Liu" > wrote in >> I recently discovered two possible bugs about synchronous replication. >> >> 1. SyncRepCleanupAtProcExit may delete an element that has been deleted >> SyncRepCl

Re: Problem with synchronous replication

2019-10-29 Thread Michael Paquier
On Tue, Oct 29, 2019 at 01:40:41PM +0800, Dongming Liu wrote: > Can someone help me to confirm that these two problems are bugs? > If they are bugs, please help review the patch or provide better fix > suggestions. There is no need to send periodic pings. Sometimes it takes time to get replies as

Re: Problem with synchronous replication

2019-10-29 Thread Kyotaro Horiguchi
Hello. At Fri, 25 Oct 2019 15:18:34 +0800, "Dongming Liu" wrote in > > Hi, > > I recently discovered two possible bugs about synchronous replication. > > 1. SyncRepCleanupAtProcExit may delete an element that has been deleted > SyncRepCleanupAtProcExit first checks whether the queue is detac

Re: Problem with synchronous replication

2019-10-29 Thread Dongming Liu
Can someone help me to confirm that these two problems are bugs? If they are bugs, please help review the patch or provide better fix suggestions. Thanks. Best regards, -- Dongming Liu -- From:LIU Dongming Sent At:2019 Oct. 25 (Fri.