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

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 (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-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

pgsql-hackers by date

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

pgsql-committers by date

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

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