Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'. - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.
Date
Msg-id CA+TgmoZquUD5Lm0oMEEGDOMWpMAwOtjbA57VBEb5gru2qe8f=w@mail.gmail.com
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.
List pgsql-hackers
On Wed, Jan 25, 2012 at 1:23 AM, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Wed, Jan 25, 2012 at 5:35 AM, Jaime Casanova <jaime@2ndquadrant.com> wrote:
>> On Tue, Jan 24, 2012 at 3:22 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>>> Add new replication mode synchronous_commit = 'write'.
>>> Replication occurs only to memory on standby, not to disk,
>>> so provides additional performance if user wishes to
>>> reduce durability level slightly. Adds concept of multiple
>>> independent sync rep queues.
>>>
>>> Fujii Masao and Simon Riggs
>>>
>>
>> i guess, you should add the new value in postgresql.conf too.
>
> Yes, I forgot to do that. Patch attached.

I think that this would be a lot more clear if we described this as
synchronous_commit = remote_write rather than just synchronous_commit
= write.  Actually, the internal constant is named that way already,
but it's not exposed as such to the user.

There's a logical hierarchy here:

fully async commit ("off") < local flush only ("local") < local flush
+ remote write (currently "write") < local flush + remote flush
(currently "on") < local flush + remote apply

All of the levels except for "off" involve waiting for local flush;
the higher levels also involve waiting for something on the remote
side.  But the name of the variable is just synchronous_commit, so I
thik that if the word "remote" doesn't appear anywhere in the
user-visible parameter name, it's not as clear as it could be.  In
addition to renaming "write" to "remote_write", I think we might also
want to add "remote_flush" as an alias for "on".

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: some longer, larger pgbench tests with various performance-related patches
Next
From: Simon Riggs
Date:
Subject: Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.