summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2007-09-11 17:15:55 +0000
committerTom Lane2007-09-11 17:15:55 +0000
commit371b213929e2723a6d00db040653927710e4ad6a (patch)
tree755766d5df4dd53cc8bafa49070a5c78e1595314
parent13ad48eb8a49bbba4e13026ed69f07a51d52d244 (diff)
Make sure that open hash table scans are cleaned up when bgwriter tries to
recover from elog(ERROR). Problem was created by introduction of hash seq search tracking awhile back, and affects all branches that have bgwriter; in HEAD the disease has snuck into autovacuum and walwriter too. (Not sure that the latter two use hash_seq_search at the moment, but surely they might someday.) Per report from Sergey Koposov.
-rw-r--r--src/backend/postmaster/bgwriter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/postmaster/bgwriter.c b/src/backend/postmaster/bgwriter.c
index 8657d1ee316..ada7d6a9e4e 100644
--- a/src/backend/postmaster/bgwriter.c
+++ b/src/backend/postmaster/bgwriter.c
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.13.4.3 2005/12/08 19:19:45 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.13.4.4 2007/09/11 17:15:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -255,6 +255,7 @@ BackgroundWriterMain(void)
/* we needn't bother with the other ResourceOwnerRelease phases */
AtEOXact_Buffers(false);
AtEOXact_Files();
+ AtEOXact_HashTables(false);
/* Warn any waiting backends that the checkpoint failed. */
if (ckpt_active)