From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: Standbys using commas in application_name cannot become sync nodes
Date: Sun, 14 Feb 2016 10:51:01 -0500
Message-ID: <17378.1455465061@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqT4BHszhuapjOJ699AbQZm2mku0UsK+ari11YyzJDwgVw@mail.gmail.com>
References: <CAB7nPqT4BHszhuapjOJ699AbQZm2mku0UsK+ari11YyzJDwgVw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Michael Paquier <michael.paquier@gmail.com> writes:
> Commas are authorized characters in application_name for a node in
> recovery, however this overlaps with the fact that
> synchronous_standby_names uses commas as a separator for each node
> name. So, if a standby node uses a comma in its name, even if its name
> is set in s_s_names it can never become a synchronous node because
> SplitIdentifierString() splits this parameter with only a comma.
> Even if I have never seen an standby using a comma in its
> application_name, this is a bug, and here are a couple of things that
> we could do regarding it:
> 1) Do not care, who is actually going to use a comma in application_name?!
> 2) Forbid the use of commas in application_name
> 3) Enhaunce a bit s_s_names splitting so as it can consider
> backslash+comma as part of a standby name. In short by setting
> s_s_names = 'foo\,bar', a standby with name 'foo,bar' would be a sync
> node.
> 4) Document the limitation and discourage the use of commas in application_name
(3) seems like a mess with likely side-effects on other uses of
SplitIdentifierString. I'd vote for (2) or (4).
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com
Subject: Re: Standbys using commas in application_name cannot become sync nodes
In-Reply-To: <17378.1455465061@sss.pgh.pa.us>
References: <CAB7nPqT4BHszhuapjOJ699AbQZm2mku0UsK+ari11YyzJDwgVw@mail.gmail.com> <17378.1455465061@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox