pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: tixu@cs.ucsd.edu
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7624: Misleading Log Message & Inconsistent Configuration Design
Date: Tue, 30 Oct 2012 10:46:29 +0800
Message-ID: <508F3F85.2030201@ringerc.id.au> (raw)
In-Reply-To: <E1TSNPE-0003BZ-Sb@wrigleys.postgresql.org>
References: <E1TSNPE-0003BZ-Sb@wrigleys.postgresql.org>

On 10/28/2012 03:35 PM, tixu@cs.ucsd.edu wrote:
> I really suggest to make the configuration file consistent in this case. But
> I understand it might not be easy. But at least I think we should print a
> better log message which pinpoints to the absolute path like
> 
> FATAL:  58P01: could not create lock file
> "/home/tianyin/postgresql-9.2.1/local/pgsql/data/local/pgsql/data/.s.PGSQL.5432.lock":
> No such file or directory

Essentially, you want PostgreSQL to print absolute paths in error
messages, instead of paths relative to the server datadir?

I'd prefer to do it slightly differently, but I like the general idea.
I'd instead want to write:

FATAL:  58P01: could not create lock file
"local/pgsql/data/.s.PGSQL.5432.lock"
(cwd="/home/tianyin/postgresql-9.2.1/local/pgsql/data/"): No such file
or directory

By spelling out the CWD explicitly there's no impression given that the
user ever actually specified the whole path in the configuration
anywhere, so it's clearer how the path came to be. It also shows which
part of the path is known-good (since it's the CWD) and which could be
at issue.

--
Craig Ringer




view thread (3+ messages)  latest in thread

Message-ID: <508F3F85.2030201@ringerc.id.au>
Permalink:  ../508F3F85.2030201@ringerc.id.au/
Also on:    postgresql.org/message-id/508F3F85.2030201@ringerc.id.au

 · 

reply

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: ringerc@ringerc.id.au, tixu@cs.ucsd.edu
  Subject: Re: BUG #7624: Misleading Log Message & Inconsistent Configuration Design
  In-Reply-To: <508F3F85.2030201@ringerc.id.au>
  References: <E1TSNPE-0003BZ-Sb@wrigleys.postgresql.org> <508F3F85.2030201@ringerc.id.au>

* 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