Re: multiple entries for synchronous_standby_names

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Nitesh Nathani <niteshn24(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: multiple entries for synchronous_standby_names
Date: 2022-06-14 02:18:40
Message-ID: YqfwAMDkhtSK7T6W@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jun 10, 2022 at 05:04:30PM +0100, Nitesh Nathani wrote:
> Trying to achieve sync streaming to barman server and i need to add an
> entry to postgresql.conf for this parameter, which already has an entry and
> tried a few variations but does not work. Any ideas? Also tried '&&' but in
> vain
>
> synchronous_standby_names='ANY 1 (*)',barman-wal-archive

This grammar flavor is not supported (see also syncrep_gram.y for the
code):
https://www.postgresql.org/docs/devel/runtime-config-replication.html

And here is the actual list of grammars supported:
[FIRST] num_sync ( standby_name [, ...] )
ANY num_sync ( standby_name [, ...] )
standby_name [, ...]

In short, you can specify a list of node names within one ANY or FIRST
clause, but you cannot specify a list made of ANY/FIRST items.
Without knowing what kind of priority policy you are trying to
achieve, it is hard to recommend one method over the others. What we
support now has proven to be hard enough to implement and to make
robust, and supporting sub-groups of nodes was also on the table back
in the day, but the lack of cases did not justify the extra
implementation complexity, as far as I recall this matter.
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark Hill 2022-06-14 03:43:19 RE: Build Postgres On AIX
Previous Message Bryn Llewellyn 2022-06-14 01:40:07 Re: "A block containing an EXCEPTION clause is significantly more expensive to enter and exit than a block without one"