Re: Standbys using commas in application_name cannot become sync nodes

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Standbys using commas in application_name cannot become sync nodes
Date: 2016-02-15 13:12:31
Message-ID: CAB7nPqTe3-Y++Vwe0cxaYDc=O9v2ko9xWqVkpzM5JggRyJomgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Feb 15, 2016 at 4:33 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>
>
> On Mon, Feb 15, 2016 at 6:56 AM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
> wrote:
>>
>> On Mon, Feb 15, 2016 at 9:24 AM, Michael Paquier
>> <michael(dot)paquier(at)gmail(dot)com> wrote:
>> > Another possibility to consider would be to mention that in the
>> > documentation on back-branches, and simply block its use on HEAD. For
>> > the quorum sync patch (which is far from baked yet), we are going to
>> > need two extra special characters to identify quorum and priority
>> > groups of nodes, so we would need to provide the same solution as for
>> > commas.
>>
>> Horiguchi-san has just mentioned in [1] that one can use double-quotes
>> in s_s_names around a node name to bypass the problem. That's
>> undocumented though, so wouldn't we want to mention that at least?
>> [1]:
>> http://www.postgresql.org/message-id/20160215.141102.28792569.horiguchi.kyotaro@lab.ntt.co.jp
>>
>
> I think that combined with option 4 (comment the possible caveat) is the
> best way forward. Especially since we have this ability, there is no need to
> restrict it and possibly break existing applications. But documenting it
> would clearly be an advantage.

OK, I just typed up a doc patch that I think follows those lines, here
is the paragraph:
+ When a standby node includes in its <varname>application_name</>
+ value a comma (<literal>,</>), it can not be chosen as a synchronous
+ standby because <varname>synchronous_standby_name</> uses as a
+ separator character a comma. This can be avoided by double-quoting
+ the standby name in the list provided by this parameter. The use
+ of commas in <varname>application_name</> is not recommended to avoid
+ any confusion though.
--
Michael

Attachment Content-Type Size
standby-commas-doc.patch text/x-patch 931 bytes

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2016-02-15 17:10:28 Re: BUG #13938: CAST error on Index "function must be immutable"
Previous Message chandrakant sharma 2016-02-15 11:27:50 Row count mismatch post pg_dump piped restore