Skip site navigation (1) Skip section navigation (2)

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:35
Message-ID: 20061006182335.CAEA39FB40F@postgresql.org (view raw or flat)
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.

Modified Files:
--------------
    pgsql/src/backend/utils/cache:
        catcache.c (r1.133 -> r1.134)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/catcache.c.diff?r1=1.133&r2=1.134)
        syscache.c (r1.107 -> r1.108)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/cache/syscache.c.diff?r1=1.107&r2=1.108)
    pgsql/src/include/utils:
        catcache.h (r1.62 -> r1.63)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/catcache.h.diff?r1=1.62&r2=1.63)

pgsql-committers by date

Next:From: Tom LaneDate: 2006-10-06 18:23:42
Subject: pgsql: Fix SysCacheGetAttr() to handle the case where the specified
Previous:From: Peter EisentrautDate: 2006-10-06 17:14:01
Subject: pgsql: Message style improvements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group