Dead code as a result of plan cache invalidation?

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Dead code as a result of plan cache invalidation?
Date: 2007-07-04 11:25:29
Message-ID: 87odiscswm.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Should this case at heaptuple.c:1606 be turned into an elog() now that we have
plan cache invalidation? If it "can't" happen then it's probably better that
we find out if it does happen rather than silently run the old plan and return
nulls.

/*
* If the attribute's column has been dropped, we force a NULL result.
* This case should not happen in normal use, but it could happen if we
* are executing a plan cached before the column was dropped.
*/
if (tupleDesc->attrs[attnum - 1]->attisdropped)
{
*isnull = true;
return (Datum) 0;
}

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2007-07-04 15:04:27 script binaries renaming
Previous Message Gregory Stark 2007-07-04 11:04:40 Re: ACM Paper relevant to our buffer algorithm