Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aUyxd-0002W6-Vi for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Feb 2016 15:51:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aUyxd-0002Sp-5h for pgsql-bugs@arkaria.postgresql.org; Sun, 14 Feb 2016 15:51:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aUyx0-0001mI-Uu for pgsql-bugs@postgresql.org; Sun, 14 Feb 2016 15:51:06 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aUywy-00024L-EJ for pgsql-bugs@postgresql.org; Sun, 14 Feb 2016 15:51:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u1EFp1RN017379; Sun, 14 Feb 2016 10:51:01 -0500 From: Tom Lane To: Michael Paquier cc: PostgreSQL mailing lists Subject: Re: Standbys using commas in application_name cannot become sync nodes In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Sun, 14 Feb 2016 21:36:04 +0900" Date: Sun, 14 Feb 2016 10:51:01 -0500 Message-ID: <17378.1455465061@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Paquier 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