| From: | Maxime Schoemans <maxime(dot)schoemans(at)enterprisedb(dot)com> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de>, amitlangote09(at)gmail(dot)com |
| Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Julien Tachoires <julien(at)tachoires(dot)me>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Qual push down to table AM |
| Date: | 2025-12-18 19:40:31 |
| Message-ID: | 78A164FE-0AD2-4F9A-AA07-81887D4CB6A4@enterprisedb.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
> On 10 Dec 2025, at 00:08, Andres Freund <andres(at)anarazel(dot)de> 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 | Content-Type | Size |
|---|---|---|
| Perform-ScanKey-evaluation-in-slot-form.patch | application/octet-stream | 5.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Masahiko Sawada | 2025-12-18 19:42:18 | Re: Assertion failure in SnapBuildInitialSnapshot() |
| Previous Message | Andres Freund | 2025-12-18 19:07:00 | Re: Recovering from detoast-related catcache invalidations |