Re: Streaming replication

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: Tatsuo Ishii <ishii(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Streaming replication
Date: 2015-03-31 00:14:45
Message-ID: 5519E6F5.4080708@catalyst.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31/03/15 12:45, Tatsuo Ishii wrote:
> In the doc:
>
> 25.2.5. Streaming Replication
> :
> The standby connects to the primary, which streams WAL records to the
> standby as they're generated, without waiting for the WAL file to be
> filled.
>
> This seems to claim that walsender sends WAL files which has not been
> fsync'd yet. However, in walsender.c:
>
> /*
> * Streaming the current timeline on a master.
> *
> * Attempt to send all data that's already been written out and
> * fsync'd to disk. We cannot go further than what's been written out
> * given the current implementation of XLogRead(). And in any case
> * it's unsafe to send WAL that is not securely down to disk on the
> * master: if the master subsequently crashes and restarts, slaves
> * must not have applied any WAL that gets lost on the master.
> */
>
> This one says walsender sends WAL records as long as there are
> fsync'd.
>
> Am I missing something?
>
>

I think the docs are trying to say that streaming replication doesn't
wait for a (16MB) WAL *file* to be filled. but sends each (fsync'd) WAL
record. I had to reread it several times too :-)

Cheers

Mark

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2015-03-31 00:26:26 Re: WIP: multivariate statistics / proof of concept
Previous Message Jim Nasby 2015-03-30 23:45:41 Re: pg_dump / copy bugs with "big lines" ?