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

From Tom Lane
Subject Re: a small proposal for avoiding foot-shooting
Date
Msg-id 23828.1229818330@sss.pgh.pa.us
Whole thread Raw
In response to a small proposal for avoiding foot-shooting  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses 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  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
List pgsql-hackers
Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
> I propose that this behaviour be changed such that 'terse' is ignored
> for all log messages of FATAL or PANIC severity.
> [ on the strength of a single example ]

This seems like using a blunderbuss where a rifle is called for.

There may indeed be some places where we have HINTS that are conveying
pretty important information, but I see no argument whatsoever that
the importance of a hint is determined by the severity level of the
message it's attached to.

I could see inventing some kind of additional ereport decoration that
says "force the hint to be printed", but realize that this is only
likely to have any effect in the postmaster log --- we can't guarantee
to control what clients do with subsidiary message fields.  So the
value seems a bit limited anyway.

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 oferrmsg("could not locate required checkpoint record")
we could have it printerrmsg("could not locate checkpoint record specified in file \"%s/backup_label\".", DataDir)
assuming we did actually get the location from there.

Anyway, you've omitted a lot of details that would be necessary
to judge exactly what was misleading about what the DBA saw.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Append major version number and for libraries soname major
Next
From: Tom Lane
Date:
Subject: Re: reloptions and toast tables