Skip to content

Feat/Add pg_ivm Extension Support#49

Open
shusaan wants to merge 8 commits intocloudnative-pg:mainfrom
shusaan:feat/add-pg_vim-extension
Open

Feat/Add pg_ivm Extension Support#49
shusaan wants to merge 8 commits intocloudnative-pg:mainfrom
shusaan:feat/add-pg_vim-extension

Conversation

@shusaan
Copy link
Copy Markdown
Contributor

@shusaan shusaan commented Dec 9, 2025

Add pg_ivm Extension Support

Closes #59

Description

This PR adds support for the pg_ivm (Incremental View Maintenance) extension to the CloudNativePG postgres-extensions-containers repository.

Dependencies

⚠️ This PR depends on the resolution of cloudnative-pg/cloudnative-pg#9383

The upstream CloudNativePG operator currently has a bug where PostgreSQL extension names containing underscores like pg_ivm fail to create clusters. This PR can be merged once that issue is resolved.

Task #42

Changes

New Files

  • pg_ivm/Dockerfile - Multi-stage build that compiles pg_ivm from source
  • pg_ivm/metadata.hcl - Extension metadata and version configuration
  • pg_ivm/README.md - Usage documentation and examples

Modified Files

  • .github/workflows/bake.yml - Added pg_ivm to CI/CD workflow

Implementation Details

Since pg_ivm is not available as a PGDG package, this implementation:

  • Builds the extension from source using the official GitHub repository
  • Compiles using PostgreSQL's PGXS build system
  • Supports PostgreSQL 18 on both Debian bookworm and trixie distributions

@shusaan shusaan requested review from a team and NiccoloFei as code owners December 9, 2025 09:57
@shusaan shusaan mentioned this pull request Dec 11, 2025
4 tasks
@gbartolini
Copy link
Copy Markdown
Contributor

Hi @shusaan, thanks for your contribution. Would you be so kind to submit again your PR, by following the instructions we have placed in this document? https://github.com/cloudnative-pg/postgres-extensions-containers/blob/main/BUILD.md

Thank you!

@gbartolini
Copy link
Copy Markdown
Contributor

Hi @shusaan, sorry to be a pain, but we have applied many changes lately to the framework and I believe we have completed all the work. I even wrote a guide on how to add a new extension. Do you mind rebasing your work on the current main and pushing your PR again? thanks.

shusaan added 6 commits April 3, 2026 18:29
- Add pg_ivm Dockerfile with multi-stage build
- Create pg_ivm README with usage instructions for CloudNativePG clusters
- Add pg_ivm metadata.hcl with version configuration for PostgreSQL 18
- Update main README.md to include pg_ivm in the extensions table

Signed-off-by: Husn E Rabbi <shussan@gmail.com>
- Enable pg_ivm in automated build pipeline

Signed-off-by: Husn E Rabbi <shussan@gmail.com>
Signed-off-by: Husn E Rabbi <shussan@gmail.com>
Signed-off-by: Husn E Rabbi <shussan@gmail.com>
Signed-off-by: Husn E Rabbi <shussan@gmail.com>
@NiccoloFei NiccoloFei force-pushed the feat/add-pg_vim-extension branch from 2d6bbb6 to c9520ea Compare April 3, 2026 16:31
Fixed the Dockerfile to:
- Install the exact EXT_VERSION submitted
- Adjust the pg_ivm licenses path
- Copy the entire lib/bitcode directory

Added newly introduced fields to metadata.hcl and adjusted
the structure to comply with the new versions format.

Added missing renovate entries in pg_ivm/README.md

Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Comply with conventions adopted when onboarding other extensions
that contain underscores, such as pg_crash.

Rename the extension's main folder in this project to `pg-ivm`,
as well as `metadata.name` and `metadata.image_name`.

As a result, the container image will be `ghcr.io/cloudnative-pg/pg-ivm`.

It remains possible to use `pg_ivm` as a name when defining the
extension's name in the Cluster's stanza.

Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
@NiccoloFei NiccoloFei force-pushed the feat/add-pg_vim-extension branch from 76f2382 to fc78301 Compare April 3, 2026 17:28
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]: pg_ivm

4 participants