The IVM Development Group has released pg_ivm 1.15, an update to the PostgreSQL extension that provides Incremental View Maintenance (IVM) for materialized views. IVM keeps materialized views up-to-date by applying only incremental changes, avoiding full recomputation.
What's Changed in pg_ivm 1.15
New feature: Metadata restore for
pg_dumpandpg_upgrade
After restoring a database or upgrading PostgreSQL, IMMVs (incrementally maintainable materialized views) previously had to be dropped and recreated manually. This release adds thepg_ivm_dump_metadatautility and therestore_immv()function, which restore the internal metadata needed for incremental maintenance. This means IMMVs can continue functioning without manual recreation after a dump/restore or upgrade.Bug fix: Incorrect maintenance with multiple trigger modifications
When a table was modified multiple times by user-defined or RI triggers, incremental maintenance could produce inconsistent results or duplicate key violations. This has been fixed, ensuring correct view updates in complex trigger scenarios.Bug fix: Segfault during outer-join views maintenance
A segmentation fault introduced in v1.14 that occurred during maintenance of views involving outer joins has been resolved.
Why This Matters for Developers
For developers using pg_ivm to power real-time analytics or reporting, this release eliminates a major operational pain point: the need to manually recreate IMMVs after database migrations or upgrades. The restore_immv() function simplifies deployment automation. Additionally, the trigger-related fix ensures data consistency in environments with complex trigger logic, while the segfault fix improves stability for views with outer joins. Upgrading to pg_ivm 1.15 is highly recommended for all users.
Source: https://www.postgresql.org/about/news/pg_ivm-115-released-3338/