Environment
- Apache AGE
1.8.0
- PostgreSQL
18.6
- Docker image used locally:
apache/age:release_PG18_1.8.0
Minimal reproduction
Run this on a fresh graph. The first Cypher statement creates one vertex with
two incoming relationships. The second statement is the candidate trigger.
LOAD 'age';
SET search_path = ag_catalog, public;
SELECT ag_catalog.create_graph('age_stale_tid_candidate');
SELECT *
FROM ag_catalog.cypher('age_stale_tid_candidate', $age$
CREATE (a {id: 1})<-[:R]-(b {id: 2}),
(a)<-[:R]-(c {id: 3})
RETURN a
$age$) AS (v agtype);
SELECT *
FROM ag_catalog.cypher('age_stale_tid_candidate', $age$
MATCH p = (n0)<-[:R*..2]-(n1)
DETACH DELETE n0, n1
RETURN p
$age$) AS (p agtype);
Observed result on the local container:
ERROR: get_vertex_entry_properties: stale TID - vertex entry references a tuple that is no longer visible
The failing Cypher uses only a variable-length relationship pattern, a
DETACH DELETE, and a return of the bound path. No layered barrier, probe
projection, UNION, or generated SQL expression is involved.
Control
Repeat the setup on another fresh graph and replace only the final projection:
MATCH p = (n0)<-[:R*..2]-(n1)
DETACH DELETE n0, n1
RETURN 1 AS result
The control returns rows successfully on the same AGE build. This isolates the
failure to materializing the path after its bound vertices have been deleted.
Issue template
Title
MATCH variable-length path followed by DETACH DELETE returns an internal
stale TID error when the deleted path is projected
Description
On Apache AGE 1.8.0, the following valid-Cypher-shaped query raises an internal
storage tuple error after deleting both vertices bound by a variable-length
path. The scalar control query completes on the same graph. The error exposes
an internal TID instead of a documented Cypher semantic error or a normal
result.
Expected behavior
Please clarify and implement one consistent behavior:
- If deleted path bindings remain legal to project, return the path rows; or
- if AGE intentionally forbids projecting a deleted binding, return a clear
documented semantic error rather than stale TID.
Actual behavior
ERROR: get_vertex_entry_properties: stale TID - vertex entry references a tuple that is no longer visible
Environment
1.8.018.6apache/age:release_PG18_1.8.0Minimal reproduction
Run this on a fresh graph. The first Cypher statement creates one vertex with
two incoming relationships. The second statement is the candidate trigger.
Observed result on the local container:
The failing Cypher uses only a variable-length relationship pattern, a
DETACH DELETE, and a return of the bound path. No layered barrier, probeprojection,
UNION, or generated SQL expression is involved.Control
Repeat the setup on another fresh graph and replace only the final projection:
The control returns rows successfully on the same AGE build. This isolates the
failure to materializing the path after its bound vertices have been deleted.
Issue template
Title
MATCHvariable-length path followed byDETACH DELETEreturns an internalstale TIDerror when the deleted path is projectedDescription
On Apache AGE 1.8.0, the following valid-Cypher-shaped query raises an internal
storage tuple error after deleting both vertices bound by a variable-length
path. The scalar control query completes on the same graph. The error exposes
an internal TID instead of a documented Cypher semantic error or a normal
result.
Expected behavior
Please clarify and implement one consistent behavior:
documented semantic error rather than
stale TID.Actual behavior