pgsql: Fix SysCacheGetAttr() to handle the case where the specified

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix SysCacheGetAttr() to handle the case where the specified
Date: 2006-10-06 18:23:42
Message-ID: 20061006182342.224D39FB427@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix SysCacheGetAttr() to handle the case where the specified syscache has not
been initialized yet. This can happen because there are code paths that call
SysCacheGetAttr() on a tuple originally fetched from a different syscache
(hopefully on the same catalog) than the one specified in the call. It
doesn't seem useful or robust to try to prevent that from happening, so just
improve the function to cope instead. Per bug#2678 from Jeff Trout. The
specific example shown by Jeff is new in 8.1, but to be on the safe side
I'm backpatching 8.0 as well. We could patch 7.x similarly but I think
that's probably overkill, given the lack of evidence of old bugs of this ilk.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/src/backend/utils/cache:
catcache.c (r1.125.2.2 -> r1.125.2.3)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/catcache.c.diff?r1=1.125.2.2&r2=1.125.2.3)
syscache.c (r1.101 -> r1.101.2.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/syscache.c.diff?r1=1.101&r2=1.101.2.1)
pgsql/src/include/utils:
catcache.h (r1.56.2.1 -> r1.56.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/catcache.h.diff?r1=1.56.2.1&r2=1.56.2.2)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2006-10-06 18:23:48 pgsql: Fix SysCacheGetAttr() to handle the case where the specified
Previous Message Tom Lane 2006-10-06 18:23:35 pgsql: Fix SysCacheGetAttr() to handle the case where the specified