Re: a small proposal for avoiding foot-shooting - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: a small proposal for avoiding foot-shooting
Date
Msg-id 20081221003534.GE3989@alvh.no-ip.org
Whole thread Raw
In response to Re: a small proposal for avoiding foot-shooting  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: a small proposal for avoiding foot-shooting  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
List pgsql-hackers
Tom Lane wrote:

> It seems like it might be better to rephrase error messages to ensure
> that anything really critical is mentioned in the primary message.
> In this case, perhaps instead of
>     errmsg("could not locate required checkpoint record")
> we could have it print
>     errmsg("could not locate checkpoint record specified in file \"%s/backup_label\".", DataDir)
> assuming we did actually get the location from there.

Is errdetail not printed when verbosity = terse?  I wonder if
backup_label should be mentioned in DETAIL rather than HINT.  Perhaps:

errmsg("could not locate required checkpoint record"),
errdetail("\"%s/backup_label\" specifies a checkpoint record not found.", DataDir),
errhint("If you are not restoring from a backup, try removing that file.")

or something like that.

I agree that this seems like critical information that should not be
printed only in a hint message.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: reloptions and toast tables
Next
From: Abhijit Menon-Sen
Date:
Subject: Re: pg_dump roles support [Review]