Re: Support for N synchronous standby servers - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Support for N synchronous standby servers
Date
Msg-id CAB7nPqQOq4JjZshT+YbrroUsLkdvBuo7MH1UyCEGFewSmgSGTg@mail.gmail.com
Whole thread Raw
In response to Re: Support for N synchronous standby servers  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Support for N synchronous standby servers
List pgsql-hackers
On Wed, Aug 13, 2014 at 2:10 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
> I sent the SIGSTOP signal to the walreceiver process in one of sync standbys,
> and then ran write transactions again. In this case, they must not be completed
> because their WAL cannot be replicated to the standby that its walreceiver
> was stopped. But they were successfully completed.

At the end of SyncRepReleaseWaiters, SYNC_REP_WAIT_WRITE and
SYNC_REP_WAIT_FLUSH in walsndctl were able to update with only one wal
sender in sync, making backends wake up even if other standbys did not
catch up. But we need to scan all the synchronous wal senders and find
the minimum write and flush positions and update walsndctl with those
values. Well that's a code path I forgot to cover.

Attached is an updated patch fixing the problem you reported.

Regards,
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal for 9.5: monitoring lock time for slow queries
Next
From: Michael Paquier
Date:
Subject: Re: WAL format and API changes (9.5)