What does HackerNews think of pg_hint_plan?
Give PostgreSQL ability to manually force some decisions in execution plans.
PostgreSQL famously does not support plan hints
I really wish the PostgreSQL core team would acknowledge that their stance on that hurts more than helps. Even Oracle with decades of engineering behind it doesn't get execution plans correct 100% of the time and provides a way to tune query execution via hints.However, TIL that https://github.com/ossc-db/pg_hint_plan exists so that will probably become a standard thing I deploy.
if we're going to talk about index functionality that would be good and effective for Postgres, an index across all partitioned tables (both normal and unique) would be very much welcomed.
the problem is finding someone to maintain it for life.
There actually is a “pg_hint_plan” [2] Postgres module that adds some hints to Postgres optimizer (but it’s not part of Postgres core as I understand):
[1] https://wiki.postgresql.org/wiki/OptimizerHintsDiscussion
I recently put up a PR for a README, you can read it here: https://github.com/ossc-db/pg_hint_plan/blob/8a00e70c387fc07...
It's unfortunate that it comes off as if maintainers think planner is good enough, because that is demonstrably not true. And from my discussions there is wide agreement that the planner will never be perfect. But agreeing that it's something that needs work is not enough, someone actually has to do the work too. Reality is that implementing any feature to PostgreSQL quality standards is hard work.