Re: Extracting only the columns needed for a query - Mailing list pgsql-hackers

From Melanie Plageman
Subject Re: Extracting only the columns needed for a query
Date
Msg-id CAAKRu_YHAqXdGrF2NiN68XQXw6_RBHZCPCaQcsY4qzWwuU5QZg@mail.gmail.com
Whole thread Raw
In response to Re: Extracting only the columns needed for a query  (Dmitry Dolgov <9erthalion6@gmail.com>)
Responses Re: Extracting only the columns needed for a query  (Melanie Plageman <melanieplageman@gmail.com>)
List pgsql-hackers
I'm bumping this to the next commitfest because I haven't had a chance
to address the questions posed by Dmitry. I'm sure I'll get to it in
the next few weeks.

> I believe it would be beneficial to add this potential API extension patch into
> the thread (as an example of an interface defining how scanCols could be used)
> and review them together.

As for including some code that uses the scanCols, after discussing
off-list with a few folks, there are three options I would like to
pursue for doing this.

One option I will pursue is using the scanCols to inform the columns
needed to be spilled for memory-bounded hashagg (mentioned by Jeff
here [1]).

The second is potentially using the scanCols in the context of FDW.
Corey, would you happen to have any specific examples handy of when
this might be useful?

The third is exercising it with a test only but providing an example
of how a table AM API user like Zedstore uses the columns during
planning.

[1] https://www.postgresql.org/message-id/e5566f7def33a9e9fdff337cca32d07155d7b635.camel%40j-davis.com

--
Melanie Plageman

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Unix-domain socket support on Windows
Next
From: Ashwin Agrawal
Date:
Subject: Re: Extracting only the columns needed for a query