Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Jaime Casanova <jaime(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.
Date: 2012-01-25 13:57:49
Message-ID: CA+TgmoZquUD5Lm0oMEEGDOMWpMAwOtjbA57VBEb5gru2qe8f=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Wed, Jan 25, 2012 at 1:23 AM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> On Wed, Jan 25, 2012 at 5:35 AM, Jaime Casanova <jaime(at)2ndquadrant(dot)com> wrote:
>> On Tue, Jan 24, 2012 at 3:22 PM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2012-01-25 14:12:54 Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.
Previous Message Fujii Masao 2012-01-25 06:23:40 Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2012-01-25 14:12:54 Re: [COMMITTERS] pgsql: Add new replication mode synchronous_commit = 'write'.
Previous Message Robert Haas 2012-01-25 13:49:56 Re: some longer, larger pgbench tests with various performance-related patches