Conversation
When AGE is loaded through shared_preload_libraries, TRUNCATE, VACUUM FULL on a table, and CLUSTER on a table attempt to access AGE catalogs even if the extension is not installed in the current database. This fails with a missing ag_catalog schema or ag_label table. Check is_age_extension_exists() before these utility branches perform graph-cache invalidation. If AGE is absent, continue through the normal ProcessUtility chain. Preserve existing invalidation when AGE is installed. Add regression coverage for missing and empty ag_catalog schemas. Verify data preservation after VACUUM FULL and CLUSTER, the selected index's clustering flag, and an empty table after TRUNCATE. Follow-up to apache#2438.
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.
With
ageinshared_preload_libraries,TRUNCATE,VACUUM FULL, andCLUSTERfail in databases without the AGE extension because the ProcessUtility hook accesses missing AGE catalogs.Follow-up to #2438: guard these three utility paths with
is_age_extension_exists(), allowing normal utility processing when AGE is absent and preserving graph-cache invalidation when installed.Reproduction
Preload AGE and restart PostgreSQL, then connect to a database without the extension or an
ag_catalogschema and run:With an empty
ag_catalogschema, all three instead fail withERROR: table "ag_label" does not exist. All succeed with this patch.Closes #2520