Re: Streaming Replication patch for CommitFest 2009-09 - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Streaming Replication patch for CommitFest 2009-09
Date
Msg-id 3f0b79eb0909240325k2eed8b76v5535da68ae223941@mail.gmail.com
Whole thread Raw
In response to Re: Streaming Replication patch for CommitFest 2009-09  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Streaming Replication patch for CommitFest 2009-09
List pgsql-hackers
Hi,

On Mon, Sep 21, 2009 at 4:51 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> I found the paging logic in walsender confusing, and didn't like the
> idea that walsender needs to set the XLOGSTREAM_END_SEG flag. Surely
> walreceiver knows how to split the WAL into files without such a flag. I
> reworked that logic, I think it's easier to understand now. I kept the
> support for the flag in libpq and the protocol for now, but it should be
> removed too, or repurposed to indicate that pg_switch_xlog() was done in
> the master. I've pushed that to 'replication-orig' branch in my git
> repository, attached is the same as a diff against your SR_0914.patch.

In the 'replication-orig' branch, walreceiver fsyncs the previous XLOG
file after receiving new XLOG records before writing them. This would
increase the backend's waiting time for replication in synchronous case.
The walreceiver should fsync the XLOG file after sending ACK (if needed)
before receiving the next XLOG records?

Regards,

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


pgsql-hackers by date:

Previous
From: Jan Urbański
Date:
Subject: Re: [PATCH] DefaultACLs
Next
From: Heikki Linnakangas
Date:
Subject: Re: Hot Standby 0.2.1