On 06/09/2013 03:02 AM, Jeff Janes wrote:
> It would be nice to have the ability to specify multiple log destinations
> with different log_min_messages for each one. I'm sure syslog already must
> implement some kind of method for doing that, but I've been happy enough
> with the text logs that I've never bothered to look into it much.
Smarter syslog flavours like rsyslog certainly do this.
No alert system triggered by events within Pg will ever be fully
sufficient. "Oops, the postmaster crashed with stack corruption, I'll
just exec whatever's in this on_panic_exec GUC (if I can still read it
and it's still valid) to hopefully tell the sysadmin about my death."
Hmm, sounds as reliable and safe as a bicycle powered by a home-made
rocket engine.
External monitoring is IMO always necessary. Something like Icinga with
check_postgres can trivially poke Pg to make sure it's alive. It can
also efficiently check the 'pg_error.log' from rsyslog that contains
only severe errors and raise alerts if it doesn't like what it sees.
If I'm already doing external monitoring (which is necessary as outlined
above) then I see much less point having Pg able to raise alerts for
problems, and am more interested in better built-in functions and views
for exposing Pg's state. Easier monitoring of WAL build-up, ways to slow
the master if async replicas or archiving are getting too far behind, etc.
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services