]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Make sure that open hash table scans are cleaned up when bgwriter tries to
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Sep 2007 17:15:48 +0000 (17:15 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Sep 2007 17:15:48 +0000 (17:15 +0000)
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.

src/backend/postmaster/bgwriter.c

index fefcbdf67b031b87e5f8e3aeb53f7435b0e81900..721933a814c07e07630a83761a2e24a2cace8b39 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.21.2.2 2007/01/27 20:15:55 tgl Exp $
+ *       $PostgreSQL: pgsql/src/backend/postmaster/bgwriter.c,v 1.21.2.3 2007/09/11 17:15:48 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -260,6 +260,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)