The pg_hint_plan development team has released pg_hint_plan 1.9.0, a new major version of the extension that lets developers influence PostgreSQL execution plans through hints embedded in SQL comments. The headline change is compatibility with PostgreSQL 19, alongside various improvements and bug fixes documented in the release notes. The release also introduces support for path generation strategies (PGS), extending the ways hints can steer planner behaviour.
- pg_hint_plan 1.9.0 targets PostgreSQL 19 and introduces path generation strategies (PGS) support.
- A coordinated set of minor releases accompanies it:
pg_hint_plan 1.8.1for PostgreSQL 18,pg_hint_plan 1.7.2for PostgreSQL 17,pg_hint_plan 1.6.3for PostgreSQL 16,pg_hint_plan 1.5.4for PostgreSQL 15, andpg_hint_plan 1.4.5for PostgreSQL 14. - Bug fixes "where applicable" include fixing an infinite loop in the hint parser when handling multi-query strings.
- The PostgreSQL 14 line reaches its final planned release, as PostgreSQL 14 support ends with
pg_hint_plan 1.4.5.
Hints are written inside SQL comments, so application queries stay valid plain SQL while giving teams a lever to adjust plans without rewriting statements. The project publishes documentation from its page, synced automatically from the source repository, so the details for the new PGS functionality and the version-specific fixes are available alongside the code.
For developers, the practical takeaway is version alignment: upgrading to PostgreSQL 19 requires pg_hint_plan 1.9.0, while teams on older majors should move to the matching minor release to pick up the parser fix. Those still running PostgreSQL 14 should plan a migration path, since this is the last release the project intends to ship for that branch. Pinning the exact extension version in deployment tooling keeps hint behaviour predictable across major upgrades, where planner internals and supported hint syntax can change.
Source: https://www.postgresql.org/about/news/pg_hint_plan-v190-released-3408/