Skip to content

Allow-list spock_output for affected PostgreSQL minors - #419

Open
hayee-bhatti wants to merge 2 commits into
v25_STABLEfrom
feature/output-plugin-libraries-spock-output
Open

Allow-list spock_output for affected PostgreSQL minors#419
hayee-bhatti wants to merge 2 commits into
v25_STABLEfrom
feature/output-plugin-libraries-spock-output

Conversation

@hayee-bhatti

Copy link
Copy Markdown
Member

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.

This PR bumps PostgreSQL to those minors (and CLI to 25.7.0) and adds version-gated, per-PG-major handling that ensures spock_output is allow-listed without disturbing existing configuration, covering both fresh installs and upgrades:

Fresh install

  • Postgres: no handling with no Spock present there is nothing to allow-list.
  • Spock: when Spock 5.x is installed against a PG that is on an affected minor, add spock_output to output_plugin_libraries before the existing restart; a fresh Spock install is what takes responsibility for the allow-listing that the PG install deliberately skips.

Upgrade

  • Postgres: 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: when upgrading Spock 5.x and the target PG minor is affected, add spock_output before the existing 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, 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.

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.
@coderabbitai

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7f047298-0297-4d7a-a009-a014168f37a7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics16 complexity · 0 duplication

MetricResults
Complexity16
Duplication0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@mmolsmmols left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One small comment regarding one of the code comments - feel free to self resolve before merge.

Comment threadcli/scripts/util.py
_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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This date looks wrong here.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hayee-bhatti@mmols