Re: Cluster name in ps output

From: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Thomas Munro <munro(at)ip9(dot)org>, Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Stephen Frost <sfrost(at)snowman(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cluster name in ps output
Date: 2014-07-04 07:43:12
Message-ID: 53B65B10.8070408@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07/04/2014 08:50 AM, Fujii Masao wrote:
> On Wed, Jul 2, 2014 at 3:45 AM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> wrote:
>> Is there a reason for not using this in synchronous_standby_names,
>> perhaps falling back to application_name if not set?
>
> You mean that if synchronous_standby_names is an empty it automatically
> should be set to cluster_name? Or, you mean that if application_name is not
> set in primary_conninfo the standby should automatically use its cluster_name
> as application_name in primary_conninfo? I'm afraid that those may cause
> the trouble such as that standby is unexpectedly treated as synchronous one
> even though a user want to set up it as asynchronous one by emptying
> synchronous_standby_names in the master.

No, I mean that synchronous_standby_names should look at cluster_name
first, and if it's not set then unfortunately look at application_name
for backward compatibility.

Using application_name for this always seems like a hack to me, and
cluster_name is a much better fit. We should have created cluster_name
back when we created synchronous_standby_names.
--
Vik

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2014-07-04 07:51:30 Re: Issue while calling new PostgreSQL command from a Java Application
Previous Message Ashoke 2014-07-04 07:00:48 Re: Issue while calling new PostgreSQL command from a Java Application