crdv7 opened a new pull request, #2578:
URL: https://github.com/apache/age/pull/2578

   With `age` in `shared_preload_libraries`, `TRUNCATE`, `VACUUM FULL`, and 
`CLUSTER` fail in databases without the AGE extension because the 
ProcessUtility hook accesses missing AGE catalogs.
   
   Follow-up to [#2438](https://github.com/apache/age/pull/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_catalog` schema and run:
   
   ```sql
   CREATE TABLE public.utility_test (id int);
   CREATE INDEX utility_test_idx ON public.utility_test (id);
   
   TRUNCATE public.utility_test;
   VACUUM FULL public.utility_test;
   CLUSTER public.utility_test USING utility_test_idx;
   -- Each fails: ERROR: schema "ag_catalog" does not exist
   ```
   
   With an empty `ag_catalog` schema, all three instead fail with `ERROR: table 
"ag_label" does not exist`. All succeed with this patch.
   
   Closes #2520


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to