Re: a small proposal for avoiding foot-shooting

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: a small proposal for avoiding foot-shooting
Date: 2008-12-21 00:35:34
Message-ID: 20081221003534.GE3989@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Abhijit Menon-Sen 2008-12-21 04:05:22 Re: pg_dump roles support [Review]
Previous Message Tom Lane 2008-12-21 00:13:55 Re: reloptions and toast tables