Make sure that open hash table scans are cleaned up when bgwriter tries to
authorTom Lane <[email protected]>
Tue, 11 Sep 2007 17:15:48 +0000 (17:15 +0000)
committerTom Lane <[email protected]>
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 15ec091eb73a0844158aafc1316dcadd20670e17..e1c4e7660ebaf44230f39a4f8e5874b4f7fc7a28 100644 (file)
@@ -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)