Re: track needed attributes in plan nodes for executor use - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Re: track needed attributes in plan nodes for executor use
Date
Msg-id f6bebff7-e942-4d78-a8b5-ed6f41bada89@gmail.com
Whole thread Raw
In response to Re: track needed attributes in plan nodes for executor use  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
On 14/7/2025 06:52, Amit Langote wrote:
> On Fri, Jul 11, 2025 at 11:09 PM Andrei Lepikhov <lepihov@gmail.com> wrote:
> To support that efficiently, the slot can store a new tts_min_valid
> field to indicate the lowest attno that needs deforming.
> Alternatively, we could use a per-attribute flag array (with
> TupleDesc->natts elements), though that adds some memory and
> complexity. The first option seems simpler and should be sufficient in
> most cases.
I'm not sure. Typically, people don't optimise the order of columns, and 
it seems to me that necessary columns can be found both at the beginning 
of the table (like the primary key) and at the end. I believe it's best 
to skip any unused columns. However, I haven't seen your patch yet to 
talk about the effect.

> I wasn’t quite sure what you meant about the CustomScan API, could you
> elaborate?
I was thinking that custom logic might require some columns that are not 
detected in the target list or qualifications. Therefore, there should 
be a method to provide the core with a list of the necessary columns.

-- 
regards, Andrei Lepikhov



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: [PATCH] Generate random dates/times in a specified range
Next
From: Japin Li
Date:
Subject: Requested WAL segment xxx has already been removed