diff options
Diffstat (limited to 'src/backend/storage/lmgr/proc.c')
-rw-r--r-- | src/backend/storage/lmgr/proc.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index 5dceb721abd..04f57707d19 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.125 2002/09/04 20:31:26 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.126 2002/09/25 20:31:40 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -391,8 +391,15 @@ ProcKill(void) /* Release any LW locks I am holding */ LWLockReleaseAll(); - /* Abort any buffer I/O in progress */ + /* + * Make real sure we release any buffer locks and pins we might be + * holding, too. It is pretty ugly to do this here and not in a + * shutdown callback registered by the bufmgr ... but we must do this + * *after* LWLockReleaseAll and *before* zapping MyProc. + */ AbortBufferIO(); + UnlockBuffers(); + AtEOXact_Buffers(false); /* Get off any wait queue I might be on */ LockWaitCancel(); @@ -430,8 +437,10 @@ DummyProcKill(void) /* Release any LW locks I am holding */ LWLockReleaseAll(); - /* Abort any buffer I/O in progress */ + /* Release buffer locks and pins, too */ AbortBufferIO(); + UnlockBuffers(); + AtEOXact_Buffers(false); /* I can't be on regular lock queues, so needn't check */ |