1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Clean up non-reentrant interface for hash_seq/HashTableWalk, so that

starting a new hashtable search no longer clobbers any other search
active anywhere in the system.  Fix RelationCacheInvalidate() so that
it will not crash or go into an infinite loop if invoked recursively,
as for example by a second SI Reset message arriving while we are still
processing a prior one.
This commit is contained in:
Tom Lane
2001-01-02 04:33:24 +00:00
parent 25d88e4c53
commit 1b8a219eef
8 changed files with 149 additions and 158 deletions

View File

@ -262,7 +262,7 @@ _xl_init_rel_cache(void)
}
static void
_xl_remove_hash_entry(XLogRelDesc **edata, int dummy)
_xl_remove_hash_entry(XLogRelDesc **edata, Datum dummy)
{
XLogRelCacheEntry *hentry;
bool found;
@ -328,7 +328,7 @@ XLogCloseRelationCache(void)
if (!_xlrelarr)
return;
HashTableWalk(_xlrelcache, (HashtFunc)_xl_remove_hash_entry, 0);
HashTableWalk(_xlrelcache, (HashtFunc) _xl_remove_hash_entry, 0);
hash_destroy(_xlrelcache);
free(_xlrelarr);