Skip to content

Commit e246cfc

Browse files
committed
Initialize cached OID to Invalid in new hash entries
Andres Freund; bug detected by valgrind
1 parent 673b527 commit e246cfc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/utils/cache/relfilenodemap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ RelidByRelfilenode(Oid reltablespace, Oid relfilenode)
180180
if (found)
181181
return entry->relid;
182182

183+
/* initialize empty/negative cache entry before doing the actual lookup */
184+
entry->relid = InvalidOid;
185+
183186
/* ok, no previous cache entry, do it the hard way */
184187

185188
/* check shared tables */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy