]> granicus.if.org Git - postgresql/commit
Fix walsender processes to establish a SIGALRM handler.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Jul 2012 18:29:58 +0000 (14:29 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Jul 2012 18:29:58 +0000 (14:29 -0400)
commit0bf8eb2a15875bc3f4d5638da73cb34ee9ca868e
tree07d41bd58f2e113631d83af44b4928f8e26fa6bf
parent4810ebe1037e5d9847a0e0ee4ec2fae026ef55f6
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.
src/backend/replication/walsender.c