pg_regresql
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_regresql | 2.2.1 | LANG | BSD-2-Clause | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3230 | pg_regresql | No | Yes | Yes | Yes | No | Yes | - |
| Related | hypopg pg_qualstats pg_hint_plan online_advisor index_advisor pg_stat_plans plan_filter pg_track_optimizer pg_strom pg_orca |
|---|
Load via LOAD or session_preload_libraries.
Version
| OS / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 2.2.0 el8.x86_64.pg18 : pg_regresql_18 pg_regresql_18-2.2.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.2.0 el8.x86_64.pg17 : pg_regresql_17 pg_regresql_17-2.2.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.2.0 el8.x86_64.pg16 : pg_regresql_16 pg_regresql_16-2.2.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.2.0 el8.x86_64.pg15 : pg_regresql_15 pg_regresql_15-2.2.0-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | N/A | PIGSTY 2.2.0 el8.aarch64.pg18 : pg_regresql_18 pg_regresql_18-2.2.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.2.0 el8.aarch64.pg17 : pg_regresql_17 pg_regresql_17-2.2.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.2.0 el8.aarch64.pg16 : pg_regresql_16 pg_regresql_16-2.2.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.2.0 el8.aarch64.pg15 : pg_regresql_15 pg_regresql_15-2.2.0-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | MISS | PIGSTY 2.2.0 el9.x86_64.pg18 : pg_regresql_18 pg_regresql_18-2.2.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.2.0 el9.x86_64.pg17 : pg_regresql_17 pg_regresql_17-2.2.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.2.0 el9.x86_64.pg16 : pg_regresql_16 pg_regresql_16-2.2.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.2.0 el9.x86_64.pg15 : pg_regresql_15 pg_regresql_15-2.2.0-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | MISS | PIGSTY 2.2.0 el9.aarch64.pg18 : pg_regresql_18 pg_regresql_18-2.2.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.2.0 el9.aarch64.pg17 : pg_regresql_17 pg_regresql_17-2.2.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.2.0 el9.aarch64.pg16 : pg_regresql_16 pg_regresql_16-2.2.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.2.0 el9.aarch64.pg15 : pg_regresql_15 pg_regresql_15-2.2.0-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | MISS | PIGSTY 2.2.0 el10.x86_64.pg18 : pg_regresql_18 pg_regresql_18-2.2.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.2.0 el10.x86_64.pg17 : pg_regresql_17 pg_regresql_17-2.2.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.2.0 el10.x86_64.pg16 : pg_regresql_16 pg_regresql_16-2.2.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.2.0 el10.x86_64.pg15 : pg_regresql_15 pg_regresql_15-2.2.0-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | MISS | PIGSTY 2.2.0 el10.aarch64.pg18 : pg_regresql_18 pg_regresql_18-2.2.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.2.0 el10.aarch64.pg17 : pg_regresql_17 pg_regresql_17-2.2.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.2.0 el10.aarch64.pg16 : pg_regresql_16 pg_regresql_16-2.2.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.2.0 el10.aarch64.pg15 : pg_regresql_15 pg_regresql_15-2.2.0-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | MISS | PIGSTY 2.2.0 d12.x86_64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.2.0 d12.x86_64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.2.0 d12.x86_64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.2.0 d12.x86_64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | MISS | PIGSTY 2.2.0 d12.aarch64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.2.0 d12.aarch64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.2.0 d12.aarch64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.2.0 d12.aarch64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | MISS | PIGSTY 2.2.0 d13.x86_64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.2.0 d13.x86_64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.2.0 d13.x86_64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.2.0 d13.x86_64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | MISS | PIGSTY 2.2.0 d13.aarch64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.2.0 d13.aarch64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.2.0 d13.aarch64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.2.0 d13.aarch64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | MISS | PIGSTY 2.2.0 u22.x86_64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.2.0 u22.x86_64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.2.0 u22.x86_64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.2.0 u22.x86_64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | MISS | PIGSTY 2.2.0 u22.aarch64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.2.0 u22.aarch64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.2.0 u22.aarch64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.2.0 u22.aarch64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | MISS | PIGSTY 2.2.0 u24.x86_64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.2.0 u24.x86_64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.2.0 u24.x86_64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.2.0 u24.x86_64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | MISS | PIGSTY 2.2.0 u24.aarch64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.2.0 u24.aarch64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.2.0 u24.aarch64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.2.0 u24.aarch64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | MISS | PIGSTY 2.2.0 u26.x86_64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.2.0 u26.x86_64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.2.0 u26.x86_64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.2.0 u26.x86_64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | MISS | PIGSTY 2.2.0 u26.aarch64.pg18 : postgresql-18-pg-regresql postgresql-18-pg-regresql_2.2.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.2.0 u26.aarch64.pg17 : postgresql-17-pg-regresql postgresql-17-pg-regresql_2.2.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.2.0 u26.aarch64.pg16 : postgresql-16-pg-regresql postgresql-16-pg-regresql_2.2.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.2.0 u26.aarch64.pg15 : postgresql-15-pg-regresql postgresql-15-pg-regresql_2.2.0-1PGSTY~resolute_arm64.deb
|
Build
You can build the RPM / DEB packages for pg_regresql using pig build:
Install
You can install pg_regresql directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Preload:
Create Extension:
Usage
Sources:
pg_regresql makes query planning use catalog statistics instead of rescaling them from physical file size. This supports plan regression tests in databases with representative statistics but little data. Release 2.2.1 installs its SQL objects in the fixed pg_catalog schema.
Activate the Planner Hook
The hook supports PostgreSQL 15 or later. Load it as a superuser in the test session:
For new sessions on a test instance, add the library to the existing session preload list:
The hook replaces table and index page/tuple estimates with pg_class values and computes visibility from catalog statistics. Inject useful statistics before comparing plans; an empty table alone is not a production workload.
Restore Statistics
On PostgreSQL 16 and 17, create the extension before loading statistics emitted by a recent pg_dump:
Version 2.2 adds pg_restore_extended_stats() and pg_clear_extended_stats() for those servers, and supports the JSON input emitted by pg_dump 19 for pg_ndistinct and pg_dependencies. On PostgreSQL 16 remove the dump’s unsupported transaction_timeout setting. PostgreSQL 18 already supplies relation/attribute restoration in core; extended restoration is in core from 19. The extension does not install these backports on 18 or later.
Upgrade and Cleanup
From SQL version 2.0, upstream requires dropping and recreating the extension. From 2.1, use ALTER EXTENSION pg_regresql UPDATE. Review dependencies before removing it. The extension is not relocatable and its install requires a superuser.
The replacement input functions named regresql_pg_*_in are deliberately detached from the extension on 16/17. DROP EXTENSION leaves them behind so the installed casts keep working; dropping the extension is therefore not a complete return to the original catalog state. Use this tool in controlled planning tests, and do not assume compatibility with other planner hooks has been tested.
PostgreSQL 19 Planner Hook
Release 2.2.1 uses build_simple_rel_hook on PostgreSQL 19 and get_relation_info_hook on earlier supported majors. After installing the matching files, run ALTER EXTENSION pg_regresql UPDATE TO '2.2.1'; on installations using 2.2. This update advances the recorded extension version and preserves the existing SQL definitions.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)