From: Alvaro Herrera Date: Tue, 27 Aug 2013 18:53:17 +0000 (-0400) Subject: Initialize cached OID to Invalid in new hash entries X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=e246cfc95f020b5fcb20a1fb946efe77113edf00;p=users%2Fbernd%2Fpostgres.git Initialize cached OID to Invalid in new hash entries Andres Freund; bug detected by valgrind --- diff --git a/src/backend/utils/cache/relfilenodemap.c b/src/backend/utils/cache/relfilenodemap.c index 2a8f83775d..f3f9a09899 100644 --- a/src/backend/utils/cache/relfilenodemap.c +++ b/src/backend/utils/cache/relfilenodemap.c @@ -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 */