Re: Frontend error logging style
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-11-15T19:45:11Z
Lists: pgsql-hackers
Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes: > Several programs wrap, say, pg_log_fatal() into a pg_fatal(), that does > logging, cleanup, and exit, as the case may be. I think that's a good > solution. I agree, and my draft patch formalized that by turning pg_log_fatal into exactly that. The question that I think is relevant here is what is the point of labeling errors as "error:" or "fatal:" if we're not going to make any serious attempt to make that distinction meaningful. I'm not really buying your argument that it's fine as-is. Anybody who thinks that there's a difference is going to be very confused by the behavior they observe. But, if we all know there's no difference, why have the difference? regards, tom lane
Commits
-
logging: Also add the command prefix to detail and hint messages
- a8cca6026e99 15.0 landed
-
Remove not-very-useful early checks of __pg_log_level in logging.h.
- 2c9381840fe2 15.0 landed
-
Improve frontend error logging style.
- 9a374b77fb53 15.0 landed
-
Apply PGDLLIMPORT markings broadly.
- 8ec569479fc2 15.0 cited