pg_regresql
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_regresql | 2.0.0 | 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 |
|---|
Activate it with LOAD pg_regresql or session_preload_libraries.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 2.0.0 | 1817161514 | pg_regresql | - |
| RPM | PIGSTY | 2.0.0 | 1817161514 | pg_regresql_$v | - |
| DEB | PIGSTY | 2.0.0 | 1817161514 | postgresql-$v-pg-regresql | - |
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: extension README, control file, portable stats article
pg_regresql is the PostgreSQL planner-hook part of RegreSQL. It makes the planner trust pg_class statistics instead of rescaling estimates from the physical file size, which is useful for plan regression testing with injected production statistics.
Activate the hook
For a whole test instance, upstream recommends:
What it overrides
The upstream README says the hook runs after estimate_rel_size() and replaces planner estimates with catalog values:
rel->pagesfrompg_class.relpagesrel->tuplesfrompg_class.reltuplesrel->allvisfracfrompg_class.relallvisible / relpagesIndexOptInfo->pagesfrom indexpg_class.relpagesIndexOptInfo->tuplesfrom indexpg_class.reltuples
Typical workflow
This is meant for reproducing production plans locally and for migration or upgrade plan-regression tests.
Notes
- The control file currently declares
default_version = '2.0'. - The public repository tags visible upstream are still
v2.0.0-alpha*, so the packaged2.0.0target is ahead of a clearly tagged final GitHub release. - Upstream documents PostgreSQL 14+ compatibility for the extension.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)