Hi,

> On 10 Dec 2025, at 00:08, Andres Freund <[email protected]> wrote:
> I don't really see this being viable without first tackling two nontrivial
> projects:
> 
> 2) Perform ScanKey evaluation in slot form, to be able to cache the deforming
>   and to make deforming of multiple columns sufficiently efficient.

Am I right in understanding that you think that the repeated calls to
heap_getattr in HeapKeyTest is not ideal if we have NULL or varlena
columns? I have written a small patch (see attached) that stores the heap
tuple in a TupleTableSlot first and then calls slot_getattr instead, which
should benefit from caching. Is that the type of solution you were thinking of?

It is definitely not a complete patch (needs comments and a description),
and it is not merged into the patch set of Julien yet, but I just wanted to
check that this was what you were proposing and that I was not
misunderstanding something.

> 1) Make slot deforming for expressions & projections selective, i.e. don't
>   deform all the leading columns, but only ones that will eventually be
>   needed


Concerning 1), I’m also not certain I understand why this is a prerequisite for
the pushdown work. It could certainly be beneficial, but it seems to be
complementary. In any case, I’d be interested to look at your POC patch
on the subject, Amit.

Best,

Maxime Schoemans

Attachment: Perform-ScanKey-evaluation-in-slot-form.patch
Description: Binary data

Reply via email to