Re: allowing extensions to control planner behavior

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: allowing extensions to control planner behavior
Date: 2024-08-27 17:17:48
Message-ID: CA+TgmoY8sw-xD8EPC-8APd+0KCEdSdREb8bS3wqfpzRqcOmzYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 27, 2024 at 12:56 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > In that vein, here's a new patch set where I've added a second patch
> > that allows extensions to control choice of index.
>
> I'm minus-several on this bit, because that is a solved problem and
> we really don't need to introduce More Than One Way To Do It. The
> intention has always been that get_relation_info_hook can editorialize
> on the rel's indexlist by removing entries (or adding fake ones,
> in the case of hypothetical-index extensions). For that matter,
> if you really want to do it by modifying the IndexInfo rather than
> deleting it from the list, that's already possible: just set
> indexinfo->hypothetical = true.

Well, now I'm confused. Just yesterday, in response to the 0001 patch
that allows extensions to exert control over the join strategy, you
complained that "Or, if your problem is that the planner wants to scan
index A but you want it to scan index B, enable_indexscan won't help."
So today, I produced a patch demonstrating how we could address that
issue, and your response is "well, actually we don't need to do
anything about it because that problem is already solved." But if that
is true, then the fact that yesterday's patch did nothing about it was
a feature, not a bug.

Am I missing something here?

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-08-27 17:45:08 Re: Showing primitive index scan count in EXPLAIN ANALYZE (for skip scan and SAOP scans)
Previous Message Tom Lane 2024-08-27 16:56:09 Re: allowing extensions to control planner behavior