pgsql: Fix walsender processes to establish a SIGALRM handler.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix walsender processes to establish a SIGALRM handler.
Date: 2012-07-12 18:30:32
Message-ID: E1SpO9o-0001On-Es@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix walsender processes to establish a SIGALRM handler.

Walsenders must have working SIGALRM handling during InitPostgres,
but they set the handler to SIG_IGN so that nothing would happen
if a timeout was reached. This could result in two failure modes:

* If a walsender participated in a deadlock during its authentication
transaction, and was the last to wait in the deadly embrace, the deadlock
would not get cleared automatically. This would require somebody to be
trying to take out AccessExclusiveLock on multiple system catalogs, so
it's not very probable.

* If a client failed to respond to a walsender's authentication challenge,
the intended disconnect after AuthenticationTimeout wouldn't happen, and
the walsender would wait indefinitely for the client.

For the moment, fix in back branches only, since this is fixed in a
different way in the timeout-infrastructure patch that's awaiting
application to HEAD. If we choose not to apply that, then we'll need
to do this in HEAD as well.

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/d066cc548de7f21e84aeb27bd43388ba82534759

Modified Files
--------------
src/backend/replication/walsender.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2012-07-12 18:37:50 pgsql: Remove 'x =- 1' check for pgindent, not needed, per report from
Previous Message Hiroshi Saito 2012-07-12 12:47:56 psqlodbc - psqlodbc: follow of fixed.