Re: Synchronous replication - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Synchronous replication
Date
Msg-id AANLkTi=-x0C0=1a9gnwzLT=nAtftTnQ+FXuNuP8CUbms@mail.gmail.com
Whole thread Raw
In response to Re: Synchronous replication  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Synchronous replication
Re: Synchronous replication
List pgsql-hackers
On Wed, Aug 4, 2010 at 12:35 AM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> There's some race conditions with the signaling. If another process finishes
> XLOG flush and sends the signal when a walsender has just finished one
> iteration of its main loop, walsender will reset xlogsend_requested and go
> to sleep. It should not sleep but send the pending WAL immediately.

Yep. To avoid that race condition, xlogsend_requested should be reset to
false after sleep and before calling XLogSend(). I attached the updated
version of the patch.

Of course, the code is also available in my git repository:
git://git.postgresql.org/git/users/fujii/postgres.git
branch: wakeup-walsnd

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Review of Synchronous Replication patches
Next
From: Simon Riggs
Date:
Subject: Re: MERGE Specification