Open
Conversation
Recreate change prevent triggers during refresh_immv in addition to base table triggers.
Contributor
|
This patch set is very disorganized. Could it be possible to get a cleaned up branch with one or more commits and dedicated commit messages to understand a bit better what you are trying to achieve here? You could force push things, once the patch has been cleaned up, but it is not in a reviewable state as it stands. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
(follow up on #128, re #118)
This is a second attempt at supporting pg_dump/pg_restore/pg_upgrade for this extension. This PR makes bigger design changes in order to provide a seamless dump/restore/upgrade experience. Users don't have to run any pre-dump or post-restore scripts in order to get their IMMVs working.
Summary of changes:
viewdefcolumn with aquerystringcolumn that stores the fully-qualified query string of each IMMV.immvuuidcolumn ofuuidtype. This is used as a unique identifier for IMMVs instead of theimmvrelid.immvuuidinstead ofimmvrelidand let the triggers look up the corresponding OID of the IMMV.querystringup to date if any objects are renamed:pg_ivm_immv.When users run pg_dump, the dump file contains the
pg_ivm_immvtable with the correct fully-qualified query strings, as well as theCREATE TRIGGERcommands to re-create the IMMV triggers. The triggers use theimmvuuidargument to look up the corresponding IMMV inpg_ivm_immv. The same goes for pg_upgrade. I ran some basic tests and it works so far with no user intervention needed.Some todos:
Eager for any feedback, thanks!