Repository navigation
Add PostgreSQL 18 support (and drop EOL Debian 11 to fix CI) - #619
Open
pulse-mind wants to merge 2 commits into
Open
pulse-mind wants to merge 2 commits into
pulse-mind wants to merge 2 commits into
Conversation
Debian 11 "bullseye" reached end of LTS in August 2026: - apt.postgresql.org no longer publishes the bullseye-pgdg suite (moved to apt-archive) - debian-security packages used by tests/prepare.yml now return 404 The debian11 Molecule job therefore fails during prepare, and since the matrix uses fail-fast, every other distro job gets cancelled, which keeps the whole CI red on master. Remove debian11 from the CI matrix, the compatibility matrix, galaxy platforms and the Molecule docs, and use debian12 as the default Molecule distro. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- templates/postgresql.conf-18.orig: postgresql.conf.sample shipped by the
PGDG 18.0 package (listen_addresses restored, as the Docker image patches it)
- templates/postgresql.conf-18.j2: derived from postgresql.conf-17.j2 by a
3-way merge of the 17 -> 18 sample changes, so `diff 17.j2 18.j2` mirrors
`diff 17.orig 18.orig`:
- new settings templated: io_method, io_workers, io_max_concurrency,
io_max_combine_limit, file_copy_method, autovacuum_worker_slots,
autovacuum_vacuum_max_threshold, vacuum_truncate,
vacuum_max_eager_freeze_failure_rate, idle_replication_slot_timeout,
max_active_replication_origins, enable_distinct_reordering,
enable_self_join_elimination, log_lock_failures, track_cost_delay_timing,
md5_password_warnings, oauth_validator_libraries, ssl_tls13_ciphers,
extension_control_path
- ssl_ecdh_curve renamed to ssl_groups
- vacuum cost/freezing settings moved to the new VACUUMING section
- extension_destdir removed: the Debian patch providing it is gone in 18
and PostgreSQL 18 refuses to start with it ("unrecognized configuration
parameter")
- log_connections keeps accepting a boolean, and also accepts a string or
a list (receipt, authentication, authorization, setup_durations, all)
- defaults: new variables, PG18 defaults for effective_io_concurrency and
maintenance_io_concurrency (16) only when postgresql_version >= 18,
PostGIS 3.6 for 18
- molecule: add a postgresql-18 instance
- postgresql_version default is unchanged (17), so existing deployments are
not silently switched to a new major version
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 19, 2026
Contributor
Author
|
Since workflows from forks need maintainer approval here, I ran the same CI workflow on my fork: all jobs pass (Yamllint + Molecule on debian12, debian13, ubuntu2204, ubuntu2404, PostgreSQL 13 to 18 with idempotence): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds PostgreSQL 18 support, and makes CI green again by dropping Debian 11 (EOL).
Fixes #616. Supersedes #617 and #599 (see Relation to #617 below).
The PR has two commits so they can be reviewed separately:
1. Why Debian 11 is dropped
The scheduled CI on
masterhas been red for weeks. The cause is only Debian 11:apt.postgresql.orgno longer servesbullseye-pgdg(it moved toapt-archive.postgresql.org), and thedebian-securitypackages installed bytests/prepare.ymlnow return 404.debian11job therefore fails duringprepare. The matrix uses fail-fast, so every other job gets cancelled in the middle ofconverge("The strategy configuration was canceled because molecule.debian11 failed"). The other distros are not actually broken.This commit follows the pattern used when Ubuntu 20.04 was removed (#603). It removes
debian11from the CI matrix, from the README compatibility matrix, from themeta/main.ymlplatforms (bullseye) and from the Molecule docs. It deletestests/vars.Debian.11.ymland changes the defaultMOLECULE_DISTROfromdebian11todebian12.2. PostgreSQL 18 support
How the template was built
templates/postgresql.conf-18.origis thepostgresql.conf.sampleshipped by the PGDG 18.0 package.listen_addressesis restored to its packaged value, because the official Docker image patches it. I used 18.0 rather than the latest minor on purpose: the template must work with every 18.x. Later minors added settings (file_extend_method,output_plugin_libraries) that 18.0 rejects.templates/postgresql.conf-18.j2comes from a 3-way merge: base17.orig, ours17.j2, theirs18.orig. As a result,diff 17.j2 18.j2mirrorsdiff 17.orig 18.orig, which should make review straightforward. As in 17, every setting of the sample is templated, exceptinclude*.Changes in PostgreSQL 18 handled by the template
io_method,io_workers,io_max_concurrency,io_max_combine_limit,file_copy_method,autovacuum_worker_slots,autovacuum_vacuum_max_threshold,vacuum_truncate,vacuum_max_eager_freeze_failure_rate,idle_replication_slot_timeout,max_active_replication_origins,enable_distinct_reordering,enable_self_join_elimination,log_lock_failures,track_cost_delay_timing,md5_password_warnings,oauth_validator_libraries,ssl_tls13_ciphers,extension_control_pathpostgresql_*variables indefaults/main.ymlset to the upstream defaults and tagged# (>= 18)ssl_ecdh_curverenamed tossl_groupspostgresql_ssl_groupsvariable (upstream defaultX25519:prime256v1)extension_destdirremoved: the Debian patch that provided it is gone in 18FATAL: unrecognized configuration parameter "extension_destdir"log_connectionsis now a list (receipt,authentication,authorization,setup_durations,all)postgresql_log_connectionsstill accepts a boolean, and now also a string or a listeffective_io_concurrencyandmaintenance_io_concurrencydefaults change to 16hash_mem_multiplier. No change for 13 to 17.VACUUMINGsectionOther changes
vars/postgresql_18.ymlplaceholder, same as for 16 and 17.postgresql_postgis_release_compatibility:18: "3.6", the first PostGIS release that supports PostgreSQL 18.postgresql-18instance.:warning:because it is not tested in CI.molecule/README.md: updated the tested versions and removed a leftover=======merge marker.Deliberately not changed
postgresql_versionstays 17. Bumping it would make the next run of the role on an existing server install PostgreSQL 18 and create a second, empty cluster next to the 17 one. The role does not runpg_upgrade. This seems better done in a separate, explicitly breaking change.Testing
Molecule (
molecule -v test, the same command as CI)Each run creates 6 containers (PostgreSQL 13, 14, 15, 16, 17 and 18) and runs create → prepare → converge → idempotence → destroy.
changed=0changed=0changed=0changed=0Toolchain pinned like CI: Python 3.12,
ansible>10,<12(ansible-core 2.18.20), molecule 26.11.0,molecule-plugins[docker], geerlingguy images. I ran this locally on an arm64 Docker host; CI runs on amd64.yamllint .passes.Template checked against real PostgreSQL 18 binaries
I rendered
postgresql.conf-18.j2with the role defaults and with severallog_connectionsvariants (false,true,"receipt,authentication",[authorization, setup_durations],all), then loaded each render with PostgreSQL 18.0 and 18.7 (PGDG packages). Every variant was accepted, the server started, andpg_settingsshowed the expected values. Examples:io_method=worker,effective_io_concurrency=16,ssl_groups=X25519:prime256v1,autovacuum_worker_slots=16.I also checked the opposite case. With the 17 template's
extension_destdirline, PostgreSQL 18 refuses to start.Also tested: Ubuntu 26.04 (not added to the matrix here)
Ubuntu 26.04 ships PostgreSQL 18 by default. With the same Molecule setup (
MOLECULE_DISTRO=ubuntu2604,resolute-pgdg) and an emptytests/vars.Ubuntu.26.yml, converge and idempotence pass (changed=0) for PostgreSQL 13 to 18. That run used the same ansible-core 2.18 against the image's Python 3.14. I'll propose adding Ubuntu 26.04 to the CI matrix in a separate PR to keep this one focused.Out of scope / known issues
defaults/main.yml(postgresql-<pg>-postgis-<x.y>) do not match the names PGDG publishes (postgresql-<pg>-postgis-3). This also affects 17 (see PostGis fails on Ubuntu 24 (Jammy) #600) and is left for a separate fix.Relation to #617
Thanks to the author of #617 for pushing this forward. That PR has two problems that this one avoids:
postgresql.conf-18.j2still rendersextension_destdir = '...'uncommented, so PostgreSQL 18 does not start on Debian/Ubuntu (FATAL: unrecognized configuration parameter "extension_destdir"). Its CI never ran, so this was not caught.postgresql_versionto 18, which affects existing deployments (see above).This PR also comes with the CI fix, so it can show green checks.
🤖 Generated with Claude Code