Re: write ahead logging in standby (streaming replication) - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: write ahead logging in standby (streaming replication)
Date
Msg-id 3f0b79eb0911120003o1b0aadddg90db49eba55bb79c@mail.gmail.com
Whole thread Raw
In response to Re: write ahead logging in standby (streaming replication)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: write ahead logging in standby (streaming replication)
List pgsql-hackers
Hi,

On Thu, Nov 12, 2009 at 4:32 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> Fujii Masao wrote:
>> The problem is that fsync needs to be issued too frequently, which would
>> be harmless in asynchronous replication, but not in synchronous one.
>> A transaction would have to wait for the primary's and standby's fsync
>> before returning a "success" to a client.
>>
>> So I'm inclined to change the startup process and bgwriter, instead of
>> walreceiver, so as to fsync the WAL for the WAL rule.
>
> Let's keep it simple for now. Just make the walreceiver do the fsync. We
> can optimize later. For now, we're only going to have async mode anyway.

Okey, I'll do that; the walreceiver issues the fsync for each arrival of
the WAL records, and the startup process replays only the records already
fsynced.

Regards,

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


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Patch committers
Next
From: Simon Riggs
Date:
Subject: Re: write ahead logging in standby (streaming replication)