YGY-001 opened a new issue, #2597:
URL: https://github.com/apache/age/issues/2597

   
   
   ## Environment
   
   - Apache AGE `1.8.0`
   - PostgreSQL `18.6`
   - Docker image: `apache/age:release_PG18_1.8.0`
   
   ## Reproduction
   
   Replace `age_issue28_REPLACE_WITH_RANDOM_SUFFIX` with a fresh, unique graph 
name,
   then run the setup and query on that empty graph:
   
   ```sql
   LOAD 'age';
   SET search_path = ag_catalog, public;
   
   SELECT ag_catalog.create_graph('age_issue28_REPLACE_WITH_RANDOM_SUFFIX');
   
   SELECT *
   FROM ag_catalog.cypher('age_issue28_REPLACE_WITH_RANDOM_SUFFIX', $$
   CREATE (a {id: 1})-[:R]->(b {id: 2})
   $$) AS (v agtype);
   
   SELECT *
   FROM ag_catalog.cypher('age_issue28_REPLACE_WITH_RANDOM_SUFFIX', $$
   MATCH (a {id: 1})-[:R]->(b {id: 2})
   UNWIND [1, 2] AS i
   CREATE (a)-[:S {i: i}]->()
   DETACH DELETE a, b
   RETURN i
   $$) AS (i agtype);
   ```
   
   ## Expected behavior
   
   Both input rows reach `CREATE` while `a` and `b` are still bound and present.
   The later `DETACH DELETE` removes them, and the query returns `1` and `2`.
   
   ## Actual behavior
   
   AGE reports:
   
   ```text
   ERROR: vertex assigned to variable a was deleted
   ```
   
   The PostgreSQL backend remains available; a subsequent `SELECT 1` succeeds.
   
   ## Controls
   
   - Replacing `UNWIND [1, 2]` with `UNWIND [1]` succeeds and returns `1`.
   - Removing `DETACH DELETE a, b` succeeds and returns `1` and `2`.
   - A row-preserving `collect`/`UNWIND` boundary before `CREATE` does not 
avoid the error.
   - The same boundary between `CREATE` and `DETACH DELETE` makes the query 
return `1` and `2`.
   


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