Uh oh!
There was an error while loading. Please reload this page.
Allow-list spock_output for affected PostgreSQL minors - #419
Allow-list spock_output for affected PostgreSQL minors#419hayee-bhatti wants to merge 2 commits into
Conversation
Recent PostgreSQL minor releases (15.19 / 16.15 / 17.11 and later) added the output_plugin_libraries allow-list, defaulting to 'pgoutput, test_decoding'. Third-party output plugins are refused unless listed, so Spock's spock_output can no longer be used by default: on the provider the replication slot can't be created and replication stops. Add version-gated, per-PG-major handling that ensures spock_output is allow-listed without disturbing existing configuration: - PG upgrade: when upgrading base Postgres to an affected minor and Spock 5.x is already installed for that PG, add spock_output before the existing restart (skipped entirely when Spock is not installed). - Spock install/upgrade: when the target PG minor is affected, add spock_output before create_extension() performs its restart. Existing entries are preserved and spock_output is appended only if missing; when the parameter is absent (e.g. an upgraded conf that predates it) the stock plugins are seeded so they are never dropped. All checks are scoped per PG major so side-by-side installs are independent. No additional server stops/restarts are introduced.
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Up to standards ✅🟢 Issues |
| Metric | Results |
|---|---|
| Complexity | 16 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewerTIP This summary will be updated as you push new changes.
mmols
left a comment
There was a problem hiding this comment.
LGTM. One small comment regarding one of the code comments - feel free to self resolve before merge.
| _SPOCK5_NAME_RE = re.compile(r"^spock5(?:0)?(?:-pg\d+)?$", re.IGNORECASE) | ||
| _SPOCK5_VER_RE = re.compile(r"^5\.", re.IGNORECASE) | ||
| # PG's Nov-2025 security releases added the output_plugin_libraries allow-list |
Recent PostgreSQL minor releases (15.19 / 16.15 / 17.11 and later) added the
output_plugin_librariesallow-list, defaulting to'pgoutput, test_decoding'. Third-party output plugins are refused unless listed, so Spock'sspock_outputcan no longer be used by default: on the provider the replication slot can't be created and replication stops.This PR bumps PostgreSQL to those minors (and CLI to 25.7.0) and adds version-gated, per-PG-major handling that ensures
spock_outputis allow-listed without disturbing existing configuration, covering both fresh installs and upgrades:Fresh install
spock_outputtooutput_plugin_librariesbefore the existing restart; a fresh Spock install is what takes responsibility for the allow-listing that the PG install deliberately skips.Upgrade
spock_outputbefore the existing restart (skipped entirely when Spock is not installed).spock_outputbefore the existing restart.Existing entries are preserved and
spock_outputis appended only if missing; when the parameter is absent (e.g. an upgraded conf that predates it) the stock plugins are seeded so they are never dropped. All checks are scoped per PG major so side-by-side installs are independent, the operations are idempotent, and no additional server stops/restarts are introduced.PostgreSQL 18 is not supported by this CLI.
Tested packages in devel for all these various install/upgrade scenarios and it seems to work well.