pg_ivm 1.3 (2022-9-30)
New feature
-
Add get_immv_def function by @thoshiai in #23
This function reconstructs the underlying SELECT command for an IMMV.
Bug fixes
-
Fix a maintenance failure of MIN/MAX aggregate views whose columns had alias names by @yugo-n in #26
Views that have a min/max aggregate with an alias name (e.g.
min(j) as min_j
) were not correctly handled and an error could be raised when a tuple was deleted from a base table. -
Fix possible incorrect maintenance due to XID wraparound or using sub-transactions by @yugo-n in #28
For maintaining self-join views or handling multiple tables modification, we need to calculate table states that was before it is modified. For get the pre-update state, previously, we used xmin and cmin system columns, but this was problematic because after a tuple is frozen and XID wraparound, xmin column no longer has any meaning. Also, it is not safe to use xmin colmun for this purpose with sub-transaction either. To fix this, we use a snapshot that taken just before the table is modified for checking tuple visibility in pre-state table instead of using xmin and cmin system columns.
-
Fix a bug that any table cannot be dropped by non-superuser by @yugo-n in #29
Previously, we used an event trigger and executed DELETE command to remove an entry, but it caused a privilege error when non-superuser dropped a table even if it is irrelevant to IMMV. To fix it, we now drop an entry in a way that doesn't need the superuser privilege in the object_access_hook function.
-
Fix a test failure for aggregates without GROUP BY by @yugo-n in #24
-
Fix a compiler warning by @marcocitus in #19
Full Changelog: v1.2...v1.3