Re: Re: Synch Rep: direct transfer of WAL file from the primary to the standby

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <gsstark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: Synch Rep: direct transfer of WAL file from the primary to the standby
Date: 2009-07-08 04:25:59
Message-ID: 3f0b79eb0907072125y2018dcadj5887852951f4187f@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Jul 8, 2009 at 4:00 AM, Heikki
Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>>  I would envision the slaves
>> connecting to the master's replication port and asking "feed me WAL
>> beginning at LSN position thus-and-so", with no notion of WAL file
>> boundaries exposed anyplace.
>
> Yep, that's the way I envisioned it to work in my protocol suggestion
> that Fujii adopted
> (http://archives.postgresql.org/message-id/4951108A.5040608@enterprisedb.com).
> The <begin> and <end> values are XLogRecPtrs, not WAL filenames.

If <begin> indicates the middle of the XLOG file, the file written to the
standby is partial. Is this OK? After two server failed, the XLOG file
including <begin> might still be required for crash recovery of the
standby server. But, since it's partial, the crash recovery would fail.
I think that any XLOG file should be written to the standby as it can
be replayed by a normal recovery.

>>The point about not wanting to archive
>> lots of WAL on the master would imply that the master reserves the right
>> to fail if the requested starting position is too old, whereupon the
>> slave needs some way to resync --- but that probably involves something
>> close to taking a fresh base backup to copy to the slave.

What if the XLOG file required for recovery has gone while doing
resync a large data? In this case, the standby might never start
because the requested starting position is always too old.

Regards,

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua Tolley 2009-07-08 05:11:46 Re: First CommitFest: July 15th
Previous Message Fujii Masao 2009-07-08 03:57:29 Re: Re: Synch Rep: direct transfer of WAL file from the primary to the standby