pgsql: Prevent interrupts while reporting non-ERROR elog messages.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Prevent interrupts while reporting non-ERROR elog messages.
Date: 2014-03-14 01:00:27
Message-ID: E1WOGU7-0003ii-Tr@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Prevent interrupts while reporting non-ERROR elog messages.

This should eliminate the risk of recursive entry to syslog(3), which
appears to be the cause of the hang reported in bug #9551 from James
Morton.

Arguably, the real problem here is auth.c's willingness to turn on
ImmediateInterruptOK while executing fairly wide swaths of backend code.
We may well need to work at narrowing the code ranges in which the
authentication_timeout interrupt is enabled. For the moment, though,
this is a cheap and reasonably noninvasive fix for a field-reported
failure; the other approach would be complex and not necessarily
bug-free itself.

Back-patch to all supported branches.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6c461cb92f295788446fbd5659b92e279244c725

Modified Files
--------------
src/backend/utils/error/elog.c | 38 +++++++++++++++++++++++++-------------
1 file changed, 25 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-03-14 01:00:28 pgsql: Prevent interrupts while reporting non-ERROR elog messages.
Previous Message Tom Lane 2014-03-13 17:49:11 pgsql: Allow psql to print COPY command status in more cases.