Re: Cluster name in ps output - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Cluster name in ps output
Date
Msg-id 15021.1399297953@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cluster name in ps output  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: Cluster name in ps output  (Stephen Frost <sfrost@snowman.net>)
Re: Cluster name in ps output  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Andres Freund <andres@2ndquadrant.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



pgsql-hackers by date:

Previous
From: Bernd Helmle
Date:
Subject: Re: tab completion for setting search_path
Next
From: Stephen Frost
Date:
Subject: Re: Cluster name in ps output