Skip site navigation (1) Skip section navigation (2)

Re: synchronous_commit and remote_write

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Aidan Van Dyk <aidan(at)highrise(dot)ca>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: synchronous_commit and remote_write
Date: 2012-05-09 16:59:39
Message-ID: CAHGQGwFeOoiOfBF-XOrU77cKk3yTxG_2MAx2vpFTD-fFFuaCag@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Thu, May 10, 2012 at 1:42 AM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Wed, May 9, 2012 at 10:02 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>>> Another thing I've been wondering is whether, perhaps, we ought to
>>> keep synchronous_commit tri-valued: on/local/off, and have a separate
>>> GUC for synchronous_replication_mode.  It's a bit arbitrary that "on"
>>> happens to mean remote fsync rather than remote write/receive.
>>
>> You mean the way it originally was? I would agree.
>
> No.  The original design for sync rep had synchronous_commit with only
> TWO values, on and off.  I think the design we eventually settled on,
> with three values, was better, and I'm in favor of keeping it.
> However, there might be some virtue in separating the knob that
> controls whether we do sync rep from the knob that controls which kind
> of sync rep we do.  I'm not sure.

At least there is one problem in separating the knob: a user can set
synchronous_commit to OFF and synchronous_replication_mode to ON,
which makes the transaction wait long for replication. In this setting,
because of asynchronous commit, WAL records cannot be written to the
local disk immediately, and which means that WAL records cannot be
sent immediately, so replication wait time would get long. AFAIR this is
the reason why we merged two parameters into one before.

Regards,

-- 
Fujii Masao

In response to

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2012-05-09 17:12:29
Subject: Re: Can pg_trgm handle non-alphanumeric characters?
Previous:From: Robert HaasDate: 2012-05-09 16:42:06
Subject: Re: synchronous_commit and remote_write

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group