Re: [COMMITTERS] pgsql: Add --synchronous option to pg_receivexlog, for more reliable WA

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Fujii Masao <fujii(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Add --synchronous option to pg_receivexlog, for more reliable WA
Date: 2015-09-16 03:04:43
Message-ID: CAHGQGwG2RBc8t=VGPSpZLDg67SPqZw5PwcP1jhPXXnHS8msVjw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Sep 16, 2015 at 11:25 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On 11/17/14 12:34 PM, Fujii Masao wrote:
>> Add --synchronous option to pg_receivexlog, for more reliable WAL writing.
>
> The last two sentences of this piece of documentation are a bit
> hand-wavy and hard to parse. Could you clarify this?

I think that what those sentences try to point is; to make pg_receivexlog run
as synchronous standby expectedly, both --slot and --synchronous options need
to be specified.

If --slot option is specified, pg_receivexlog reports a flush position to
the server even though --synchronous is not specified. So users might think
that --synchrnous option is not necessary for synchronous pg_receivexlog
setting. But that's not true. If --synchronous option is not specified, the
received WAL data is flushed to the disk only when WAL segment is switched.
So the transactions on the master need to wait for a long time, i.e.,
we can think that synchronous pg_receivexlog doesn't work smoothly.
To avoid such situation, --synchronous option also needs to be specified and
which makes pg_receivexlog flush WAL data immediately after receiving it.

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2015-09-16 05:17:49 pgsql: Review program help output for wording and formatting
Previous Message Peter Eisentraut 2015-09-16 02:25:09 Re: [COMMITTERS] pgsql: Add --synchronous option to pg_receivexlog, for more reliable WA

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2015-09-16 03:12:34 Re: [DOCS] max_worker_processes on the standby
Previous Message Amit Kapila 2015-09-16 02:59:10 Re: Additional LWLOCK_STATS statistics