On 10 November 2012 00:29, Daniel Farina <daniel@heroku.com> wrote:
> Me too. Database clients finding these unambiguously platform-level
> problems and being relied upon to report them to receive treatment is
> a long-standing embarrassment to me. However, I've been way too
> swamped to even start thinking of how one would disentangle error
> reporting suitable for physical issues from logical issues.
I complained about this a few months ago (and a few months before
that), and the upshot was that we kicked around a few ideas and were
able to outline a useful API [1]. The idea here was to derive what I
called magnitude from SQLSTATE. In other words, we'd represent how
routine or non-routine a particular error message was (the "wake me up
in the middle of the night" factor). Severity levels don't and cannot
capture this, since for example a FATAL error occurs in the event of
failed authentication, whereas ERRORs (technically a lesser severity)
may occur in far more serious situations that a Postgres DBA can
reasonably hope to never see, with problems that indicate data
corruption, for example.
[1] http://archives.postgresql.org/message-id/CAEYLb_XdtyJE6WtUy4TGdjUQ6eUtjJp0cTfLaDP9qwp8gOtTdg@mail.gmail.com
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services