pg_hint_plan

Give PostgreSQL ability to manually force some decisions in execution plans.

Overview

PGDG 1st Party Extension: pg_hint_plan : Give PostgreSQL ability to manually force some decisions in execution plans.

Information

Metadata

  • Latest Version: 1.7.0
  • Postgres Support: 17,16,15,14,13
  • Need Load: Shared library do not need explicit loading
  • Need DDL: Need CREATE EXTENSION DDL
  • Relocatable: Can be installed into other schemas
  • Trusted: Untrusted, Require Superuser to Create
  • Schemas: hint_plan
  • Requires: N/A

RPM / DEB

  • RPM Repo: PGDG
  • RPM Name: pg_hint_plan_$v*
  • RPM Ver : 1.7.0
  • RPM Deps: N/A
  • DEB Repo: PGDG
  • DEB Name: postgresql-$v-pg-hint-plan
  • DEB Ver : 1.7.0
  • DEB Deps: N/A

Packages

OS Arch PG17 PG16 PG15 PG14 PG13
el8 x86_64 pg_hint_plan_17
PGDG 1.7.0
pg_hint_plan_16
PGDG 1.6.1
pg_hint_plan_15
PGDG 1.5.2
pg_hint_plan_14
PGDG 1.4.3
pg_hint_plan_13
PGDG 1.3.9
el8 aarch64 pg_hint_plan_17
PGDG 1.7.0
pg_hint_plan_16
PGDG 1.6.1
pg_hint_plan_15
PGDG 1.5.2
pg_hint_plan_14
PGDG 1.4.3
pg_hint_plan_13
PGDG 1.3.9
el9 x86_64 pg_hint_plan_17
PGDG 1.7.0
pg_hint_plan_16
PGDG 1.6.1
pg_hint_plan_15
PGDG 1.5.2
pg_hint_plan_14
PGDG 1.4.3
pg_hint_plan_13
PGDG 1.3.9
el9 aarch64 pg_hint_plan_17
PGDG 1.7.0
pg_hint_plan_16
PGDG 1.6.1
pg_hint_plan_15
PGDG 1.5.2
pg_hint_plan_14
PGDG 1.4.3
pg_hint_plan_13
PGDG 1.3.9
d12 x86_64 postgresql-17-pg-hint-plan
PGDG 1.7.0
postgresql-16-pg-hint-plan
PGDG 1.6.1
postgresql-15-pg-hint-plan
PGDG 1.5.2
postgresql-14-pg-hint-plan
PGDG 1.4.3
postgresql-13-pg-hint-plan
PGDG 1.3.10
d12 aarch64 postgresql-17-pg-hint-plan
PGDG 1.7.0
postgresql-16-pg-hint-plan
PGDG 1.6.1
postgresql-15-pg-hint-plan
PGDG 1.5.2
postgresql-14-pg-hint-plan
PGDG 1.4.3
postgresql-13-pg-hint-plan
PGDG 1.3.10
u22 x86_64 postgresql-17-pg-hint-plan
PGDG 1.7.0
postgresql-16-pg-hint-plan
PGDG 1.6.1
postgresql-15-pg-hint-plan
PGDG 1.5.2
postgresql-14-pg-hint-plan
PGDG 1.4.3
postgresql-13-pg-hint-plan
PGDG 1.3.10
u22 aarch64 postgresql-17-pg-hint-plan
PGDG 1.7.0
postgresql-16-pg-hint-plan
PGDG 1.6.1
postgresql-15-pg-hint-plan
PGDG 1.5.2
postgresql-14-pg-hint-plan
PGDG 1.4.3
postgresql-13-pg-hint-plan
PGDG 1.3.10
u24 x86_64 postgresql-17-pg-hint-plan
PGDG 1.7.0
postgresql-16-pg-hint-plan
PGDG 1.6.1
postgresql-15-pg-hint-plan
PGDG 1.5.2
postgresql-14-pg-hint-plan
PGDG 1.4.3
postgresql-13-pg-hint-plan
PGDG 1.3.10
u24 aarch64 postgresql-17-pg-hint-plan
PGDG 1.7.0
postgresql-16-pg-hint-plan
PGDG 1.6.1
postgresql-15-pg-hint-plan
PGDG 1.5.2
postgresql-14-pg-hint-plan
PGDG 1.4.3
postgresql-13-pg-hint-plan
PGDG 1.3.10

Installation

Install pg_hint_plan via the pig CLI tool:

pig ext install pg_hint_plan

Install pg_hint_plan via Pigsty playbook:

./pgsql.yml -t pg_extension -e '{"pg_extensions": ["pg_hint_plan"]}' # -l <cls>

Install pg_hint_plan RPM from YUM repo directly:

dnf install pg_hint_plan_17*;
dnf install pg_hint_plan_16*;
dnf install pg_hint_plan_15*;
dnf install pg_hint_plan_14*;
dnf install pg_hint_plan_13*;

Install pg_hint_plan DEB from APT repo directly:

apt install postgresql-17-pg-hint-plan;
apt install postgresql-16-pg-hint-plan;
apt install postgresql-15-pg-hint-plan;
apt install postgresql-14-pg-hint-plan;
apt install postgresql-13-pg-hint-plan;

Enable pg_hint_plan extension on PostgreSQL cluster:

CREATE EXTENSION pg_hint_plan;




Last modified 2025-02-17: add extension part (cfa504b)