Re: Removing unneeded self joins - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Removing unneeded self joins
Date
Msg-id CAPpHfdsZvamg7XonkdkoYzBHcT0+7NVtM1wazt_zOVC6ACyE0Q@mail.gmail.com
Whole thread Raw
In response to Re: Removing unneeded self joins  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Wed, Jul 16, 2025 at 1:16 AM Michael Paquier <michael@paquier.xyz> wrote:
> On Wed, Jul 16, 2025 at 12:38:58AM +0300, Alexander Korotkov wrote:
> > I recently got notification this is in Open Items.
> > https://wiki.postgresql.org/wiki/PostgreSQL_18_Open_Items
> > What is your opinion on this: do we need additional hook, fair to
> > leave this "as is" or another option?
>
> I'm OK with the statu-quo on my side when it comes to plan hinting.
> With the GUC workaround, it's still possible to get through so it is
> not like we don't have any options.  The point about other extensions
> still stands, I think, but perhaps we are OK even on these fronts as
> the join search hook is far from being the most popular one AFAIK.
>
> So dropping the item and do nothing is a fine answer.

OK, thank you for your feedback.  I've searched GitHub for other users
of join_search_hook.  A couple of interesting use cases I found are
the following.
https://github.com/wulczer/saio
https://github.com/ashenBlade/pg_dphyp
But they provide alternative join optimization algorithms.  So, in
spite of pg_hint_plan they are probably OK to optimize whatever joins
are left.  Thus, it's not yet clear whether this issue affects anybody
else.  I've moved this item into the "non-bugs" list, but I'm OK to
re-open it if there are other affected extensions.

------
Regards,
Alexander Korotkov
Supabase



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Removing unneeded self joins
Next
From: Jacob Champion
Date:
Subject: Re: libpq: Process buffered SSL read bytes to support records >8kB on async API