Re: Cluster name in ps output

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Thomas Munro <munro(at)ip9(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cluster name in ps output
Date: 2014-05-05 13:52:33
Message-ID: 15021.1399297953@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2014-05-05 10:49:19 +0000, Thomas Munro wrote:
>> Hah -- I agree, but on systems using setproctitle, the program name and ":
>> " are provided already, so the end result would have to be different on
>> those systems and I figured it should be the same everywhere if possible.

> Fair point.

How about dropping the brackets, and the cluster-name concept, and
just doing

postgres: 5432 checkpointer process

>>> Aren't you potentially dereferencing a NULL pointer here?

>> Hmm -- I thought the GUC machinery would make sure cluster_name either
>> pointed to the default I provided, an empty string, or a string read from
>> the configuration file. Perhaps I need to go and read up on how GUCs work.

> That's true - but I am not sure you can guarantee it's only called after
> the GUC machinery has started up.

The elog code MUST be able to work before GUC initialization is done.
What do you think will happen if we fail to open postgresql.conf,
for example?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2014-05-05 14:01:35 Re: Cluster name in ps output
Previous Message Bernd Helmle 2014-05-05 13:49:34 Re: tab completion for setting search_path