From: | Andrei Lepikhov <lepihov(at)gmail(dot)com> |
---|---|
To: | Jakub Wartak <jakub(dot)wartak(at)enterprisedb(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: allowing extensions to control planner behavior |
Date: | 2024-10-19 03:00:43 |
Message-ID: | a04c17c7-ece1-4842-a52d-ac4f4b3714c9@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 18/10/2024 14:56, Jakub Wartak wrote:
> Hi Andrei,
>
> On Fri, Oct 11, 2024 at 8:21 AM Andrei Lepikhov <lepihov(at)gmail(dot)com
> <mailto:lepihov(at)gmail(dot)com>> wrote:
> out of curiosity, why do You think it would be inappropriate to do so in
> the core? Maybe it Is something similiar to compute_query_id that can be
> computed externally too.
Generally, a hash value doesn't 100% guarantee the uniqueness of a node
identification. Also, RelOptInfo corresponds to a subtree in the final
plan, and sometimes, it takes work to find which node in the partially
executed plan corresponds to this specific estimation on row number
during selectivity estimation. Remember parameterised paths - you should
attach some signature for each path. So, it is not fully strict method.
If you are interested, I can perhaps explain the method a little bit
more at some meetup.
> I remember Tom arguing that query_id should be
> computed externally by extension for some reasons because each extension
> may want differently to fingerprint the queries, but I cannot find link
> to discussion now or bring more details)
I argued a lot about allowing extensions to provide separate query_ids
and came up with the patch a year ago. But it needs more debate on use
cases - my use cases are primarily from enterprise-grade closed
extensions, and it doesn't convince anyone. Also, I think any query_id
should be generated, likewise the core-made one. Does it seem like an
extensible Perl script?
--
regards, Andrei Lepikhov
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2024-10-19 04:17:27 | Re: Wrong security context for deferred triggers? |
Previous Message | Michael Paquier | 2024-10-19 01:32:56 | Re: [BUG FIX] Fix validation of COPY options FORCE_NOT_NULL/FORCE_NULL |