git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 673b527)
Initialize cached OID to Invalid in new hash entries
2013年8月27日 18:53:17 +0000 (14:53 -0400)
2013年8月27日 18:53:17 +0000 (14:53 -0400)
Andres Freund; bug detected by valgrind


diff --git a/src/backend/utils/cache/relfilenodemap.c b/src/backend/utils/cache/relfilenodemap.c
index 2a8f83775d26c6daa3f2a2ac2891ee2c4b81dafc..f3f9a098996a9f1c3eadca8248a0591fcefcd026 100644 (file)
--- 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 */
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /