Why do we expand tuples in execMain.c?

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Why do we expand tuples in execMain.c?
Date: 2018-08-08 04:20:26
Message-ID: 20180808042026.lw3bvhpvcktq6qmn@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I noticed
if (HeapTupleHeaderGetNatts(tuple.t_data) <
RelationGetDescr(erm->relation)->natts)
{
copyTuple = heap_expand_tuple(&tuple,
RelationGetDescr(erm->relation));
}
else
{
/* successful, copy tuple */
copyTuple = heap_copytuple(&tuple);
}

in EvalPlanQualFetchRowMarks, and I'm somewhat confused why it's there?
If it's required here, why isn't it required in dozens of other places?

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2018-08-08 04:55:22 Re: Early WIP/PoC for inlining CTEs
Previous Message Peter Geoghegan 2018-08-08 02:00:27 Re: Shared buffer access rule violations?