Skip to content

feat: default output_plugin_libraries for Spock on patched PG minors - #64

Merged
moizpgedge merged 4 commits into
mainfrom
Feat/PLAT-722/Set-output_plugin_libraries-for-newer-PG-minor-versions
Aug 12, 2026
Merged

feat: default output_plugin_libraries for Spock on patched PG minors#64
moizpgedge merged 4 commits into
mainfrom
Feat/PLAT-722/Set-output_plugin_libraries-for-newer-PG-minor-versions

Conversation

@moizpgedge

Copy link
Copy Markdown
Contributor

Description
Newer PostgreSQL versions (16.15, 17.11, 18.5+) block Spock's replication plugin by default, which breaks replication once a node updates to one of these versions. This sets the new output_plugin_libraries setting to allow it, so replication keeps working.

One thing to know: if you need to stay on an older PG version, you can disable this by setting it to null — but only at the top-level chart config. Setting it to null per-node doesn't actually work (it gets sent as an empty value instead of removed, which still breaks). I found this while testing and documented it clearly so no one hits it by surprise.

Tested by:

Reproducing the actual crash on a live cluster running the affected PG version
Confirming the top-level null override boots cleanly and replication works
Confirming the per-node override fails, and checking exactly why
Adding unit tests for all three cases; full test suite passes

… minors

PostgreSQL 16.15/17.11/18.5+ gate logical decoding output plugins behind
a new output_plugin_libraries allow-list that excludes spock_output by
default, breaking replication once a node picks up a patched minor via
the chart's mutable image tag. Set it to include spock_output by
default, and document overriding it to null at the chart-wide level for
clusters pinned to an older minor — a per-node override does not work,
since it round-trips through the Kubernetes API as an empty string
rather than an omitted key, which pre-patch Postgres still rejects.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@moizpgedge, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2978d715-5f03-49c0-ad39-47d4ab250c35

📥 Commits

Reviewing files that changed from the base of the PR and between f88b4db and e0e1714.

📒 Files selected for processing (2)
  • test/integration/multicluster_test.go
  • values.yaml
📝 Walkthrough

Walkthrough

The chart now sets PostgreSQL output_plugin_libraries to pgoutput, test_decoding, and spock_output. Documentation covers version compatibility and overrides. Unit tests verify default rendering and global or per-node null behavior. The test workflow uses a patched PostgreSQL image.

Changes

PostgreSQL plugin configuration

Layer / File(s) Summary
Default plugin settings
values.yaml, docs/configuration.md, README.md
The default cluster specification includes the three output plugins. The documented PostgreSQL parameters also include checkpoint settings.
Plugin compatibility and overrides
docs/configuration.md, docs/configuration.md.gotmpl
The documentation describes patched-version requirements, custom plugin lists, chart-wide null overrides, and per-node override behavior.
Null override validation
test/unit/cluster_test.go, test/unit/testdata/*output-plugin-libraries*
Unit tests verify that global null removes the parameter and per-node null preserves it with a nil value.
Test environment and release note
.github/workflows/test.yaml, changes/unreleased/...
The test workflow uses the patched PostgreSQL image. The release note records the new default and compatibility behavior.

Poem

I twitch my nose at plugins three,
In PostgreSQL’s config tree.
Global nulls make values fade,
Node nulls stay where they were laid.
Tests hop bright through every case.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a default output_plugin_libraries value for Spock on patched PostgreSQL minor versions.
Description check ✅ Passed The description accurately explains the PostgreSQL compatibility issue, configuration behavior, documented override, and test coverage.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Feat/PLAT-722/Set-output_plugin_libraries-for-newer-PG-minor-versions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codacy-production

codacy-production Bot commented Aug 12, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 9 complexity · 4 duplication

Metric Results
Complexity 9
Duplication 4

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.

Comment thread docs/configuration.md.gotmpl Outdated

### output_plugin_libraries and older PostgreSQL minor versions

PostgreSQL 16.15, 17.11, 18.5, and newer minor versions add a new `output_plugin_libraries` allow-list that gates which logical decoding output plugins a server accepts. Its built-in default is `pgoutput, test_decoding`, which does not include `spock_output`. Without it on the list, Spock cannot create its replication slot and replication stops on the provider node.

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.

18.5 was recalled, so you can list 18.6 here.

18.5 was recalled and replaced by 18.6, so it never shipped as a
patched minor. Point at the version that actually did.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/configuration.md (1)

244-246: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make the older-version fallback explicit.

State that a cluster remaining on an older minor must use a consistent image version across all nodes and set the chart-wide output_plugin_libraries: null override. Do not rely on the phrase “pin every node's image consistently” alone.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/configuration.md` around lines 244 - 246, Update the warning in the
configuration documentation to explicitly require clusters remaining on an older
minor to use the same image version on every node and set the chart-wide
pgEdge.clusterSpec output_plugin_libraries override to null. Replace the
ambiguous “pin every node's image consistently” guidance while preserving the
explanation that single-node null overrides do not omit the parameter.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/configuration.md`:
- Around line 244-246: Update the warning in the configuration documentation to
explicitly require clusters remaining on an older minor to use the same image
version on every node and set the chart-wide pgEdge.clusterSpec
output_plugin_libraries override to null. Replace the ambiguous “pin every
node's image consistently” guidance while preserving the explanation that
single-node null overrides do not omit the parameter.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8aa10964-eb02-4b4f-af0b-9861bb2aafba

📥 Commits

Reviewing files that changed from the base of the PR and between d5bfb66 and 2af03d2.

📒 Files selected for processing (3)
  • docs/configuration.md
  • docs/configuration.md.gotmpl
  • values.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • values.yaml
  • docs/configuration.md.gotmpl

@moizpgedge
moizpgedge requested a review from mmols August 12, 2026 15:35
Comment thread values.yaml Outdated
The chart's default Postgres image (18-spock5-standard) still
resolves to a minor version that predates output_plugin_libraries,
so chart-testing and integration-tests fail against it. Point both
at the same tag in pgEdge's internal image repo instead, which
already has a patched version from postgres-images#28's approved
build — one env var, no changes to any test values file, easy to
remove once the public tag catches up.

Also adds the changie entry for this feature.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/test.yaml:
- Line 20: Update the TEST_POSTGRES_IMAGE setup in the workflow so both test
jobs authenticate to GHCR before Kind pulls the image. Configure narrowly scoped
registry credentials from the available GitHub token, create the corresponding
Kubernetes imagePullSecret in the Kind cluster, and ensure both jobs use that
secret when pulling the PostgreSQL image.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a725f933-0747-42be-bb8c-722b3c046962

📥 Commits

Reviewing files that changed from the base of the PR and between 2af03d2 and f88b4db.

📒 Files selected for processing (2)
  • .github/workflows/test.yaml
  • changes/unreleased/Added-20260812-212552.yaml

Comment thread .github/workflows/test.yaml
@mmols mmols changed the title Feat: default output_plugin_libraries for Spock on patched PG minors feat: default output_plugin_libraries for Spock on patched PG minors Aug 12, 2026
…t too

TestMultiClusterInstall builds its own install options independently
of the shared helper the other integration tests use, and never had
the pgEdge.clusterSpec.imageName override wired in at all — only
initSpockImageName. Confirmed live: this is why integration-tests
kept failing after pointing CI at the internal repo's patched image;
every other test already picked it up through the shared helper.

Also trims the output_plugin_libraries comment in values.yaml per
review: the full explanation lives in the docs already.
@moizpgedge
moizpgedge merged commit c6028cb into main Aug 12, 2026
7 of 8 checks passed
Sign up for free to 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