Re: PoC: adding CustomJoin, separate from CustomScan

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tomas Vondra <tomas(at)vondra(dot)me>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PoC: adding CustomJoin, separate from CustomScan
Date: 2025-07-24 19:08:37
Message-ID: CA+TgmoZP+c=9tJpeGx-PJTSLcef-6Ck1kX9__bor=+FTEMPt2g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 24, 2025 at 12:48 PM Tomas Vondra <tomas(at)vondra(dot)me> wrote:
> I was thinking about this a bit more, and I think the CustomScan join
> essentially has to construct it's own info how to build the tuple, most
> likely in PlanCustomPath, because once setrefs.c does it's thing it's
> way too late for that I think. And the only way to store that is
> custom_private, so no fancy custom structs. I'll give it a try.

Yeah, I think that's probably right.

> Seems much more convenient to allow doing what regulars joins do, and
> only force the extension to do the manual stuff if it wants to do
> something like multiway-joins ...

I think that the motivating use case for the existing support was
wanting to offload work to something that looks altogether unlike the
normal PostgreSQL executor, rather than (as you want to do) implement
a new type of join within the PostgreSQL executor. The latter might
merit different infrastructure, although I cringe a little bit at the
idea of having two ways of implementing custom joins when the total
number of projects using this infrastructure is probably less than
five.

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message walid falcon 2025-07-24 19:18:08 شهادة الأبوة في المغرب
Previous Message Dave Cramer 2025-07-24 19:03:45 Re: More protocol.h replacements this time into walsender.c