mirror of
https://github.com/postgres/postgres.git
synced 2025-10-15 05:46:52 +03:00
In HS, Startup process sets SIGALRM when waiting for buffer pin. If
woken by alarm we send SIGUSR1 to all backends requesting that they check to see if they are blocking Startup process. If so, they throw ERROR/FATAL as for other conflict resolutions. Deadlock stop gap removed. max_standby_delay = -1 option removed to prevent deadlock.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.585 2010/01/21 09:30:36 sriggs Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.586 2010/01/23 16:37:12 sriggs Exp $
|
||||
*
|
||||
* NOTES
|
||||
* this is the "main" module of the postgres backend and
|
||||
@@ -2718,6 +2718,18 @@ RecoveryConflictInterrupt(ProcSignalReason reason)
|
||||
{
|
||||
switch (reason)
|
||||
{
|
||||
case PROCSIG_RECOVERY_CONFLICT_BUFFERPIN:
|
||||
/*
|
||||
* If we aren't blocking the Startup process there is
|
||||
* nothing more to do.
|
||||
*/
|
||||
if (!HoldingBufferPinThatDelaysRecovery())
|
||||
return;
|
||||
|
||||
MyProc->recoveryConflictPending = true;
|
||||
|
||||
/* Intentional drop through to error handling */
|
||||
|
||||
case PROCSIG_RECOVERY_CONFLICT_LOCK:
|
||||
case PROCSIG_RECOVERY_CONFLICT_TABLESPACE:
|
||||
case PROCSIG_RECOVERY_CONFLICT_SNAPSHOT:
|
||||
|
Reference in New Issue
Block a user