Re: Synch Rep v5 - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Synch Rep v5
Date
Msg-id 1231690602.18005.890.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Synch Rep v5  ("Fujii Masao" <masao.fujii@gmail.com>)
Responses Re: Synch Rep v5  ("Fujii Masao" <masao.fujii@gmail.com>)
List pgsql-hackers
On Sun, 2009-01-11 at 15:11 +0900, Fujii Masao wrote:

> Yes, using semaphores for the communication is also my first approach.
> The problem of this approach is that walsender cannot wait for both
> signal from backends and the response from walreceiver concurrently,
> because
> wait-for-semaphore is blocking at least. So, I use signal for the
> communication.

IIUC: In sync mode backend sends signal to walsender, then adds itself
to wait queue on semaphore. walsender responds to signal, sends more WAL
then waits for response. When response comes it then wakes backends on
the semaphore. In async mode, no signal is sent and we do not wait, we
just allow the walsender to wake up periodically and send.

Does it release waiters as soon as possible, or does it always respond
to new requests for sending? i.e. which has priority - responding to
waiters who need to be woken or responding to new requests to send?

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Synch Rep v5
Next
From: Simon Riggs
Date:
Subject: Recovery Test Framework