Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR follows a previous PR proposal that was not merged because it was not accepted by Yugo Nagata, the developer and maintainer of pg_ivm. This new version, which will not be proposed in the original repo and is not intended to be used by others than us, therefore consists of systematically creating the IMMVs in unlogged mode to meet our needs while introducing the minimum of code changes compared to the original repo that we forked. We will indeed need to take advantage of all future developments of pg_ivm while minimizing conflicts related to possible too significant code divergences. The choice to force the non-persistence of IMMVs directly at the desired location is also linked to the fact that we will not be able to rely on the polymorphic aspect of postgresql functions. Indeed, and furthermore, a
create_immv()
function of our own, replacing the official version in the original repo, would sooner or later conflict with future developments, making it impossible to execute thealter extension pg_ivm update
command, which would need to be executed to manage updates without having to destroy existing IMMVs.In other words, the modification proposed here, which is not the most elegant (unlike the previous proposal), is the simplest way to meet our needs and the associated constraints, both present and future.
Tests
refresh_immv()
usingwith_data = true
refresh_immv()
usingwith_data = false