gregfelice commented on issue #2520:
URL: https://github.com/apache/age/issues/2520#issuecomment-5370017459

   Confirmed on current master (`4d9b2506`, AGE 1.8.0) built against PostgreSQL 
18.4, with `shared_preload_libraries = age` and a database that never had 
`CREATE EXTENSION age` run in it:
   
   ```
   $ psql -d noage -c "CREATE TABLE t (i int);" -c "INSERT INTO t VALUES (1);" 
-c "TRUNCATE t;"
   CREATE TABLE
   INSERT 0 1
   ERROR:  schema "ag_catalog" does not exist
   ```
   
   I also reproduced your control result — in the same database, with the same 
preload, everything else works:
   
   ```
   UPDATE 1
   DELETE 1
   VACUUM
   DROP TABLE
   ```
   
   So the failure really is specific to `TRUNCATE`, which matches your 
root-cause reading that `ag_ProcessUtility_hook()` handles `T_TruncateStmt` and 
reaches `get_graph_oid_for_table()` without the extension-exists guard that 
#2161 added on the `object_access_hook` path.
   
   Worth underlining the operational impact you noted, because it is easy to 
miss: this is not confined to graph workloads. One database on the cluster 
wanting AGE means `TRUNCATE` breaks in every *other* database on that instance, 
including ones with no graph data at all. That makes preloading AGE unsafe on 
any shared cluster.
   
   Reported against 1.8.0 from PGDG apt on PG 18.6; confirmed here on master 
against PG 18.4, so it is neither fixed nor packaging-specific.
   


-- 
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