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.
                 */
                LWLockReleaseAll();
                AtEOXact_Files();
+               AtEOXact_HashTables(false);
 
                /*
                 * Now return to normal top-level context and clear ErrorContext for
 
                /* 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)
 
 #include "miscadmin.h"
 #include "postmaster/walwriter.h"
 #include "storage/bufmgr.h"
+#include "storage/fd.h"
 #include "storage/ipc.h"
 #include "storage/lwlock.h"
 #include "storage/pmsignal.h"
 #include "storage/smgr.h"
 #include "utils/guc.h"
+#include "utils/hsearch.h"
 #include "utils/memutils.h"
 #include "utils/resowner.h"
 
                                                         false, true);
                /* we needn't bother with the other ResourceOwnerRelease phases */
                AtEOXact_Buffers(false);
+               AtEOXact_Files();
+               AtEOXact_HashTables(false);
 
                /*
                 * Now return to normal top-level context and clear ErrorContext for