| From: | Andres Freund <andres(at)anarazel(dot)de> | 
|---|---|
| To: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>,pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: Why do we expand tuples in execMain.c? | 
| Date: | 2018-08-09 01:15:39 | 
| Message-ID: | 7D81FA76-38CC-4F07-BFBD-94C7FBB3E849@anarazel.de | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On August 9, 2018 1:33:17 AM GMT+05:30, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com> wrote:
>
>
>On 08/08/2018 12:20 AM, Andres Freund wrote:
>> 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?
>>
>>
>
>
>
>Not dozens, I think, since you can't have short records for catalog 
>tables, which account for most of the calls to heap_copytuple().
>
>I will look at the remainder of cases (less than 10) and reply in a day
>
>or two.
But why is it needed at all, and the deforming code at the site where we access the columns isn't sufficient?
Andres
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Geoghegan | 2018-08-09 01:42:56 | Re: buildfarm: could not read block 3 in file "base/16384/2662": read only 0 of 8192 bytes | 
| Previous Message | Asim R P | 2018-08-09 00:59:04 | Re: Shared buffer access rule violations? |