Bruce Momjian <br...@momjian.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