Skip to content

Latest commit

 

History

History

pg-ivm

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

pg_ivm

pg_ivm is an open-source extension that provides Incremental View Maintenance (IVM) for PostgreSQL, allowing materialized views to be updated incrementally when base tables change.

Usage

1. Add the pg_ivm extension image to your Cluster

Define the pg_ivm extension under the postgresql.extensions section of your Cluster resource. Note: pg_ivm must be loaded via shared_preload_libraries for its trigger-based IVM functionality to work correctly. For example:

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: cluster-pg-ivm
spec:
  imageName: ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie
  instances: 1

  storage:
    size: 1Gi

  postgresql:
    shared_preload_libraries:
      - "pg_ivm"
    extensions:
    - name: pg_ivm
      image:
        # renovate: suite=trixie-pgdg depName=postgresql-18-pg-ivm
        reference: ghcr.io/cloudnative-pg/pg-ivm:1.17-18-trixie

2. Enable the extension in a database

You can install pg_ivm in a specific database by creating or updating a Database resource. For example, to enable it in the app database:

apiVersion: postgresql.cnpg.io/v1
kind: Database
metadata:
  name: cluster-pg-ivm-app
spec:
  name: app
  owner: app
  cluster:
    name: cluster-pg-ivm
  extensions:
  - name: pg_ivm
    # renovate: suite=trixie-pgdg depName=postgresql-18-pg-ivm extractVersion=^(?<version>\d+\.\d+)
    version: '1.17'

3. Verify installation

Once the database is ready, connect to it with psql and run:

\dx

You should see pg_ivm listed among the installed extensions.

Contributors

This extension is maintained by:

  • Husn E Rabbi (@shusaan)

The maintainers are responsible for:

  • Monitoring upstream releases and security vulnerabilities.
  • Ensuring compatibility with supported PostgreSQL versions.
  • Reviewing and merging contributions specific to this extension's container image and lifecycle.

Licenses and Copyright

This container image contains software that may be licensed under various open-source licenses.

All relevant license and copyright information for the pg_ivm extension and its dependencies are bundled within the image at:

/licenses/

By using this image, you agree to comply with the terms of the licenses contained therein.