Re: PG does not support one function of its extension pg_hint_plan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: 李奇隆 <12232409(at)mail(dot)sustech(dot)edu(dot)cn>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: PG does not support one function of its extension pg_hint_plan
Date: 2024-11-01 13:57:19
Message-ID: 1699566.1730469439@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> On Fri, Nov 1, 2024 at 11:13:09AM +0800, 李奇隆 wrote:
>> In the GitHub repository for PostgreSQL’s pg_hint_plan extension, there is an
>> issue where the generated join order does not match the assigned join order.
>> After reviewing the source code, I found that this inconsistency with input
>> hints is due to PostgreSQL’s implementation and is not a bug in pg_hint_plan.

> Just to clarify, the bug is not in pg_hint_plan but in the fact that the
> Postgres server ignores "disable_cost of disabled operators in the
> initial phase of cost estimation," right?

We have never promised anything about supporting pg_hint_plan.

Having said that, this analysis is all obsolete in the wake of
commit e22253467. Somebody (not me) would need to look into
whether a similar effect still exists with the new model for
disabling plan types.

Also, there's a highly relevant thread over at

https://www.postgresql.org/message-id/flat/CA%2BTgmoZY%2BbaV-T-5ifDn6P%3DL%3DaV-VkVBrPmi0TQkcEq-5Finww%40mail.gmail.com

It would probably be better to bring any conclusions to that
thread instead of starting a new one.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2024-11-01 14:22:17 Re: Having problems generating a code coverage report
Previous Message Greg Sabino Mullane 2024-11-01 13:54:41 Re: Changing the default random_page_cost value