aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/postinit.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-03-18 05:24:24 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-03-18 05:24:24 +0000
commitb03072571e3c4b9adb6a22ea40b4467ef7a2a78c (patch)
tree76ecf85cfcc383ff8359cf4ce833267cf2b2f6f1 /src/backend/utils/init/postinit.c
parentbcfe5088e5deb98a3b919612b8c102860d5de0bf (diff)
downloadpostgresql-b03072571e3c4b9adb6a22ea40b4467ef7a2a78c.tar.gz
postgresql-b03072571e3c4b9adb6a22ea40b4467ef7a2a78c.zip
Need to release buffer pins before attempting to drop files during
backend exit. Per report from Bruce.
Diffstat (limited to 'src/backend/utils/init/postinit.c')
-rw-r--r--src/backend/utils/init/postinit.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 453bd937991..16d54ca0ba4 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.139 2004/12/31 22:01:40 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.139.4.1 2005/03/18 05:24:24 tgl Exp $
*
*
*-------------------------------------------------------------------------
@@ -470,13 +470,14 @@ ShutdownPostgres(int code, Datum arg)
* since that just raises the odds of failure --- but there's some
* stuff we need to do.
*
- * Release any LW locks and buffer context locks we might be holding.
- * This is a kluge to improve the odds that we won't get into a
- * self-made stuck-lock scenario while trying to shut down.
+ * Release any LW locks, buffer content locks, and buffer pins we might be
+ * holding. This is a kluge to improve the odds that we won't get into a
+ * self-made stuck-lock scenario while trying to shut down. We *must*
+ * release buffer pins to make it safe to do file deletion, since we
+ * might have some pins on pages of the target files.
*/
LWLockReleaseAll();
- AbortBufferIO();
- UnlockBuffers();
+ AtProcExit_Buffers();
/*
* In case a transaction is open, delete any files it created. This