mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
Initialize cached OID to Invalid in new hash entries
Andres Freund; bug detected by valgrind
This commit is contained in:
parent
673b527534
commit
e246cfc95f
3
src/backend/utils/cache/relfilenodemap.c
vendored
3
src/backend/utils/cache/relfilenodemap.c
vendored
@ -180,6 +180,9 @@ RelidByRelfilenode(Oid reltablespace, Oid relfilenode)
|
||||
if (found)
|
||||
return entry->relid;
|
||||
|
||||
/* initialize empty/negative cache entry before doing the actual lookup */
|
||||
entry->relid = InvalidOid;
|
||||
|
||||
/* ok, no previous cache entry, do it the hard way */
|
||||
|
||||
/* check shared tables */
|
||||
|
Loading…
Reference in New Issue
Block a user