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
Ответ на
Список
Дерево обсуждения
a small proposal for avoiding foot-shooting Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: a small proposal for avoiding foot-shooting Tom Lane <tgl@sss.pgh.pa.us>
Re: a small proposal for avoiding foot-shooting Alvaro Herrera <alvherre@commandprompt.com>
Re: a small proposal for avoiding foot-shooting Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: a small proposal for avoiding foot-shooting Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: a small proposal for avoiding foot-shooting "Albe Laurenz" <laurenz.albe@wien.gv.at>
Re: a small proposal for avoiding foot-shooting Andrew Gierth <andrew@tao11.riddles.org.uk>
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
Дата:
От: Abhijit Menon-Sen
Дата:
FAQ