PostgreSQL 19 Lifecycle Window and Default Major Decoupling
Decision date: 2026-11-21
Status: Implemented (verified in source and local tests abovev1.11.0; not yet published in a release).
Current reference:pig ext,pig repo,pig build,pig sty,pig pg tune
Scope: Active PostgreSQL major window, default major selection, legacy explicit version operations, repository modules, build toolsets, Pigsty template mutations, and version-gated tuning parameters.
Decision
Promote PostgreSQL 19 from Beta to the active support window (19, 18, 17, 16, 15) and retire
end-of-life PostgreSQL 14 from active lifecycle defaults, availability matrices, repository
bundles, build toolsets, and Pigsty template configuration.
Decouple the recommended default major (PostgresDefaultMajorVersion = 18) from the newest active
major (PostgresLatestMajorVersion() = 19). Commands that previously fell back to the newest
active major when no local PostgreSQL installation or explicit -v flag was present now resolve to
PostgreSQL 18.
Retain retired majors (10–14) as explicitly addressable legacy versions for package installation,
extension management, dynamic category aliases, local installation discovery, and protected kernel
removal, without keeping EOL repositories in the bundled repository definitions.
Context
In v1.11.0 (commit
365bf12), PIG modeled 18, 17, 16, 15, 14 as
active stable majors and 19 as a Beta target. Multiple subsystems coupled implicit default
selection directly to PostgresLatestMajorVersion():
pig install,pig ext add/rm/update/import, and unversionedpgsql-<category>aliases defaulted to the highest active version (18) only because19was still outside the active slice.pig sty conf -v 19injected thebetarepository module and emitted Beta warnings.cli/repo/assets/repo.ymlpointed PG 19 attestingrepositories and included EOLpgdg14andpgdg14-nonfree, while upstream PGDG published GAyum/19repositories for RHEL 9 and 10 only (dropping RHEL 8 and Debian 11 for PostgreSQL 19).pig pg tuneemittedio_workersfor everypgVersion >= 18, even though PostgreSQL 19 removed staticio_workersin favor ofio_min_workersandio_max_workers.
Advancing the active list to include 19 without decoupling the default major or gating el8 and
io_workers would silently switch unpinned installs to PostgreSQL 19, break pig build tool on
EL 8, and emit invalid PostgreSQL 19 configuration lines.
Alternatives considered
- Advance the default major immediately to PostgreSQL 19. Rejected because third-party extension coverage and Pigsty configuration templates still target PostgreSQL 18 by default during early PostgreSQL 19 adoption.
- Keep PostgreSQL 14 in the active window and
pgdgrepository module. Rejected because PostgreSQL 14 has reached upstream end of life; keeping it inpgdgandbuild tooladds unneeded repository metadata and build dependencies on every fresh host. - Drop
10–14from alias generation and-vresolution completely. Rejected because operators managing existing PostgreSQL 14 (or older) hosts still needpig ext,pig pg,pg14*aliases, and kernel removal safeguards to work when compatible repositories or local installations exist. - Remove the
betarepository module and--betaflags outright, or leavebetaempty until PG 20 Beta1. Rejected because PGDG already publishes PostgreSQL 20 testing repositories for EL 9/10 (yum/testing/20) and exposes component20inpgdg-testingfor Debian 12/13 and Ubuntu 22/24/26; advancing the opt-in Beta target directly to PostgreSQL 20 keepsbeta,--beta,pg20*aliases, andpig sty conf -v 20immediately usable for PG 20 testing while leavingbetasafely empty on unsupportedel8andd11.
Contract
- Version tiers & platform bounds (
cli/ext):PostgresActiveMajorVersionsis[19, 18, 17, 16, 15].PostgresDefaultMajorVersionis18;PostgresBetaMajorVersionadvances to20(PG 20 testing/devel).PostgresLegacyMajorVersionsis[14, 13, 12, 11, 10].SupportsOSPG(osCode, ver)centralizes the OS × PostgreSQL compatibility boundary (el8andd11stop at PG 18;el7stops at PG 15) acrosscli/ext,cli/build, andcli/sty.
- Implicit defaults vs. explicit targets:
- When no active
pg_configis detected and-vis omitted,pig install,pig ext add/rm/update/import, unversionedpgsql-<category>aliases, andpig pg tunefall back to18. - Local
DetectPostgres()installation discovery prefers the highest installed major (for example, an installed PostgreSQL 19 instance takes precedence when multiple versions exist and none is onPATH) while still discovering10–14installations. - Numbered static aliases (
pg10*–pg20*), dynamic category aliases (pg10-<cate>–pg20-<cate>), and protected removal checks cover all known majors (10–20), with Betapg20-<cate>borrowing the PG 19 PGDG-origin matrix.
- When no active
- Catalog & availability matrices (
cli/ext):- Embedded
extension.csvis refreshed to the2026-11-24627-entry snapshot, adding PostgreSQL 19 contrib entriespg_plan_advice(controlless shared library,need_ddl=false) andpg_stash_advice(need_ddl=true), along with live native PostgreSQL 15–19 availability matrices (32,923available,160missing, and3,477not-applicable cells). pig ext availtext and structured outputs filter matrix summaries and entries to the active15–19window (80cells across 8 OS releases × 2 architectures × 5 active majors). Single-extension tables renderPkgNA(N) cells as dimmedn/a(distinct from blankMmissing cells), while globalpig ext availdisplays only OS-supported active majors (15–18onel8,15–19on EL 9/10 and Debian/Ubuntu).- Active majors (
15–19) use exact native matrix cells (el8has no PG 19 packages and never borrows PG 18). Retired majors (10–14) remain explicitly operable for direct extension packages, static aliases (pg14*), and removal safeguards; dynamic category aliases fall back to non-forkrpm_pg/deb_pgdeclarations when present in a catalog (the refreshed PG 15–19 catalog no longer declares PG 14 entries).
- Embedded
- Repositories (
cli/repo):- Add
pgdg19for EL 9 and EL 10 (x86_64,aarch64) acrossdefault,china, andeuropemirrors; filter module memberships per OS/arch so EL 9/10pgdgcontainspgdg-commonpluspgdg19–pgdg15, EL 8pgdgomitspgdg19, and EL 7pgdgcontainspgdg-commonandpgdg15. - Remove
pgdg14,pgdg14-nonfree, andpgdg19-beta; alignpgdg15-nonfreethroughpgdg18-nonfreeonskip_if_unavailable=1. - Advance the
betamodule to PostgreSQL 20 testing:pgdg20-beta(yum/testing/20, EL 9/10,x86_64/aarch64,module_hotfixes=1) andpgdg-beta(${distro_codename}-pgdg-testing main 20, Debian 12/13 and Ubuntu 22/24/26,x86_64/aarch64). Onel8,el7, andd11where PG 20 testing is unavailable,betaremains an empty compatibility module ([]) that writes no repository file, omitsfile_pathin structured results, returns a clean empty result frompig repo info beta, does not interfere with replacement rollback, and fails closed before backing up active repositories whenpig repo setselects only empty modules.
- Add
- Build & Pigsty configuration (
cli/build,cli/sty,cmd):pig build toolinstalls server/devel packages for15–19on EL 9/10 and15–18on EL 8 (plusopenssl-develacross EL 8/9/10), and gates future Beta packages throughSupportsOSPG.pig build pgrxdefaults tocargo-pgrx 0.20.1, resolves Cargo acrossCARGO_HOME,~/.cargo/bin/cargo, andPATH, validates OS-compatible--pgtargets, and fails fast when requested or auto-detected Linuxpg_configpaths are absent.pig build dep,pig build ext, andpig build pkgvalidate--pgagainst OS-supported installable majors, pick OS-compatiblerpm_pg/deb_pgdefaults (for example, PG 18 onel8), fail fast when an extension resolves to zero compatible targets, propagate explicit--pgenvironment variables (PG_VERSIONS,PG_SUPPORTED_VERSIONS, and single-majorPG_MAJOR/PG_CONFIG) to Debianmakebuilds, and updatelibpgfeutilssources to PG 15–19 (15.20–19.0).pig build repo --beta,pig build tool --beta, andpig build pgrx --betatarget PostgreSQL 20 testing/beta on supported platforms (EL 9/10, Debian 12/13, Ubuntu 22/24/26; safely skipped onel8andd11).pig sty confaccepts-vin15–19plus explicit20beta (reporting19|18|17|16|15 (beta: 20)in help output), rewrites generic templates to PostgreSQL 19 without injectingbeta, injectsbetaand emits a Beta warning for PostgreSQL 20, and emits a non-fatal warning when configuring PG 19 or 20 on a Linuxel8host.
- Parameter tuning (
cli/postgres):pig pg tuneemitsio_workersonly whenpgVersion == 18, omitting it on PostgreSQL 19+.
Consequences
PostgreSQL 19 packages, extensions, build environments, and Pigsty configurations work out of the
box on EL 9/10, Debian 12/13, and Ubuntu 22.04/24.04/26.04 without Beta flags, while default
installations and templates remain anchored on PostgreSQL 18. EL 8 hosts continue to build and
install PostgreSQL 15–18 cleanly without requesting nonexistent postgresql19-* RPMs. Existing
PostgreSQL 14 environments retain explicit CLI operability when their repositories remain configured
on the host, while new hosts no longer pull EOL PostgreSQL 14 repository definitions.
Because user-cached ~/.pig/extension.csv and ~/.pig/repo.yml take precedence over embedded
assets when present, publishing updated remote catalog files alongside the binary release is
required for existing installations running pig repo reload or pig ext reload.
Verification and evolution
Implemented in PIG commits
b36d683,
461339c,
a7061b1,
52847f4,
ba77eac,
9d16584, and
9bf3093
and verified locally with:
git diff --check,go vet ./...,go mod verify,make gr-check,actionlint, andgovulncheck ./...go test -shuffle=on -count=1 ./...(26/26 packages)go test -race -shuffle=on -count=1 ./cli/ext ./cli/repo ./cli/build ./cli/sty ./cli/postgresand CI./cmdrace regressions (-count=3on both CI shuffle seeds)staticcheck ./...,golangci-lint run --enable-only gocognit,gocyclo --tests=false, anddeadcode ./...make docs-check(Hugo build,bin/check_markdown.py,bin/check_design.py, andbin/check_internal_links.py)
When PostgreSQL 20 reaches GA, advance PostgresActiveMajorVersions to [20, 19, 18, 17, 16] and
retarget PostgresBetaMajorVersion and beta repositories to PostgreSQL 21 testing.
Current status
Implemented in source commits b36d683–9bf3093
and companion documentation; not yet published in a tagged binary release or deployed to remote
catalog endpoints. See the release notes for published binary releases.