Re: Problem with synchronous replication

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "lingce(dot)ldm" <lingce(dot)ldm(at)alibaba-inc(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with synchronous replication
Date: 2019-10-31 08:38:32
Message-ID: CAHGQGwEW1P6LS36go9EF=tx3kVaLZrmm=YkEBs3GXZGpT9j4hg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 31, 2019 at 11:12 AM Michael Paquier <michael(at)paquier(dot)xyz> 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 <masao(dot)fujii(at)gmail(dot)com> 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 better to check SHMQueueIsDetached() again after taking the lock.
> >> That is,
> >
> > I'm not sure how much that harms but double-checked locking
> > (releasing) is simple enough for reducing possible congestion here, I
> > think.
>
> FWIW, I could not measure any actual difference with pgbench -C, up to
> 500 sessions and an empty input file (just have one meta-command) and
> -c 20.
>
> I have added some comments in SyncRepCleanupAtProcExit(), and adjusted
> the patch with the suggestion from Fujii-san. Any comments?

Thanks for the patch! Looks good to me.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message amul sul 2019-10-31 08:41:03 Can avoid list_copy in recomputeNamespacePath() conditionally?
Previous Message Amit Langote 2019-10-31 08:18:46 Re: [PATCH] Do not use StdRdOptions in Access Methods