Re: Quorum commit for multiple synchronous replication.

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Vik Fearing <vik(at)2ndquadrant(dot)fr>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Quorum commit for multiple synchronous replication.
Date: 2016-09-21 09:54:16
Message-ID: 8886b713-3d73-53ed-0fd3-051a410805ad@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21/09/16 09:18, Vik Fearing wrote:
> On 09/21/2016 08:30 AM, Michael Paquier wrote:
>> On Sat, Sep 17, 2016 at 2:04 AM, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>>> Since we already released 9.6RC1, I understand that it's quite hard to
>>> change syntax of 9.6.
>>> But considering that we support the quorum commit, this could be one
>>> of the solutions in order to avoid breaking backward compatibility and
>>> to provide useful user interface.
>>> So I attached these patches.
>>
>> standby_config:
>> - standby_list { $$ = create_syncrep_config("1", $1); }
>> - | FIRST NUM '(' standby_list ')' { $$ =
>> create_syncrep_config($1, $4); }
>> + standby_list { $$ =
>> create_syncrep_config("1", $1, SYNC_REP_PRIORITY); }
>> + | ANY NUM '(' standby_list ')' { $$ =
>> create_syncrep_config($2, $4, SYNC_REP_QUORUM); }
>> + | FIRST NUM '(' standby_list ')' { $$ =
>> create_syncrep_config($2, $4, SYNC_REP_PRIORITY); }
>>
>> Reading again the thread, it seems that my previous post [1] was a bit
>> misunderstood. My position is to not introduce any new behavior
>> changes in 9.6, so we could just make the FIRST NUM grammar equivalent
>> to NUM.
>>
>> [1]: https://www.postgresql.org/message-id/CAB7nPqRDvJn18e54ccNpOP1A2_iUN6-iU=4nJgmMgiAgvcSDKA@mail.gmail.com
>
> I misunderstood your intent, then. But I still stand by what I did
> understand, namely that 'k (...)' should mean 'any k (...)'. It's much
> more natural than having it mean 'first k (...)' and I also think it
> will be more frequent in practice.
>

I think so as well.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kuntal Ghosh 2016-09-21 10:07:26 Re: pgbench - compute & show latency consistently
Previous Message Petr Jelinek 2016-09-21 09:53:17 Re: Logical Replication WIP