Re: a small proposal for avoiding foot-shooting

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: a small proposal for avoiding foot-shooting
Дата
Msg-id 20081221003534.GE3989@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: a small proposal for avoiding foot-shooting  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: a small proposal for avoiding foot-shooting  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: reloptions and toast tables
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: pg_dump roles support [Review]