Skip to content

feat: add wal2json container image#197

Open
solidDoWant wants to merge 7 commits into
cloudnative-pg:mainfrom
solidDoWant:feat/wal2json
Open

feat: add wal2json container image#197
solidDoWant wants to merge 7 commits into
cloudnative-pg:mainfrom
solidDoWant:feat/wal2json

Conversation

@solidDoWant
Copy link
Copy Markdown

@solidDoWant solidDoWant commented Apr 26, 2026

Adds a new immutable extension image for wal2json, the JSON output plugin for PostgreSQL logical decoding. The image is built for PostgreSQL 18 on Debian bookworm and trixie, packaged from the PGDG postgresql-18-wal2json package (2.6-3).

Since wal2json is a logical decoding output plugin (no SQL extension, no .control file), create_extension is false and the Chainsaw suite verifies the plugin by creating a logical replication slot with wal2json and asserting the slot becomes active.

Includes CODEOWNERS entry, maintainer metadata, and a top-level README listing.

Closes #77

Assisted-by: Claude Opus 4.7

@solidDoWant solidDoWant requested review from a team and NiccoloFei as code owners April 26, 2026 19:16
@solidDoWant solidDoWant mentioned this pull request Apr 26, 2026
4 tasks
@reyvonger
Copy link
Copy Markdown

bump

@gnom4ik
Copy link
Copy Markdown

gnom4ik commented May 22, 2026

bump

Comment thread wal2json/README.md Outdated
Comment thread wal2json/README.md Outdated
@gbartolini
Copy link
Copy Markdown
Contributor

Successfully ran:

task e2e:test:full TARGET=wal2json

@gbartolini
Copy link
Copy Markdown
Contributor

gbartolini commented May 22, 2026

You basically commit to maintaining this extension image, including future updates. And if you don't, we, the maintainers, reserve the right to remove the extension from this project. We normally ask this when somebody submits an extension via the issue tracker (see #77 - theoretically we should have closed that ticket and you should have opened a new one - or you comment on that ticket saying that you are available to take over).

I hope it is clearer now. It is also briefly explained in the contributing guidelines for a new extension.

Let me know if you are happy to go.

@solidDoWant solidDoWant requested a review from gbartolini May 22, 2026 18:29
@gbartolini
Copy link
Copy Markdown
Contributor

Awesome, added you as CODEOWNER.

solidDoWant and others added 3 commits May 23, 2026 10:03
This plugin supports extracting WAL changes and
converting them to JSON format.

Closes cloudnative-pg#77

Assisted-by: Claude Opus 4.7

Signed-off-by: solidDoWant <[email protected]>
Set `wal2json` maintainer info to solidDoWant

Signed-off-by: solidDoWant <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
spec:
imageName: ($values.pg_image)
instances: 1
enableSuperuserAccess: true
Copy link
Copy Markdown
Contributor

@GabriFedi97 GabriFedi97 May 25, 2026

Choose a reason for hiding this comment

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

I guess enableSuperuserAccess: true was added because creating replication slots is only allowed for roles having the REPLICATION attribute.

We could just grant the replication attribute to the default user by using the managed roles, so we can avoid enabling the superuser:

Suggested change
enableSuperuserAccess: true
managed:
roles:
- name: app
ensure: present
login: true
replication: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I considered that, but I'm not certain which option is cleaner since we typically don't want to grant replication permissions to the standard app user, except for convenience. However, this approach prevents the assignment of superuser access and might fall into the convenience category. :)

If you'd like to propose this change, @GabriFedi97, I will approve it. Thank you!

Copy link
Copy Markdown
Contributor

@GabriFedi97 GabriFedi97 May 26, 2026

Choose a reason for hiding this comment

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

I think that makes more explicit and clear which additional privilege is required, rather than granting all of them via the superuser. This is just a testing environment though, so I'm not too opinionated either.

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.

[New Extension]: wal2json

5 participants