File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change 9
9
*
10
10
*
11
11
* IDENTIFICATION
12
- * $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.63 2005/03/04 20:21:06 tgl Exp $
12
+ * $PostgreSQL: pgsql/src/backend/storage/buffer/localbuf.c,v 1.64 2005/03/18 16:16:09 tgl Exp $
13
13
*
14
14
*-------------------------------------------------------------------------
15
15
*/
@@ -259,3 +259,17 @@ AtEOXact_LocalBuffers(bool isCommit)
259
259
}
260
260
#endif
261
261
}
262
+
263
+ /*
264
+ * AtProcExit_LocalBuffers - ensure we have dropped pins during backend exit.
265
+ *
266
+ * This is just like AtProcExit_Buffers, but for local buffers. We have
267
+ * to drop pins to ensure that any attempt to drop temp files doesn't
268
+ * fail in DropRelFileNodeBuffers.
269
+ */
270
+ void
271
+ AtProcExit_LocalBuffers (void )
272
+ {
273
+ /* just zero the refcounts ... */
274
+ MemSet (LocalRefCount , 0 , NLocBuffer * sizeof (* LocalRefCount ));
275
+ }
Original file line number Diff line number Diff line change 8
8
*
9
9
*
10
10
* IDENTIFICATION
11
- * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.142 2005/03/18 05:24:13 tgl Exp $
11
+ * $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.143 2005/03/18 16:16:09 tgl Exp $
12
12
*
13
13
*
14
14
*-------------------------------------------------------------------------
@@ -515,6 +515,7 @@ ShutdownPostgres(int code, Datum arg)
515
515
*/
516
516
LWLockReleaseAll ();
517
517
AtProcExit_Buffers ();
518
+ AtProcExit_LocalBuffers ();
518
519
519
520
/*
520
521
* In case a transaction is open, delete any files it created. This
Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
8
8
* Portions Copyright (c) 1994, Regents of the University of California
9
9
*
10
- * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.90 2005/03/04 20:21:07 tgl Exp $
10
+ * $PostgreSQL: pgsql/src/include/storage/bufmgr.h,v 1.91 2005/03/18 16:16:09 tgl Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -158,6 +158,7 @@ extern void BufferSync(void);
158
158
extern void BgBufferSync (void );
159
159
160
160
extern void InitLocalBuffer (void );
161
+ extern void AtProcExit_LocalBuffers (void );
161
162
162
163
/* in freelist.c */
163
164
extern void StrategyHintVacuum (bool vacuum_active );
You can’t perform that action at this time.
0 commit comments