Skip to content

Variable-length path fan-out followed by DETACH DELETE fails with an internal missing-vertex error #2539

Closed

Description

@YGY-001

Docker image apache/age:release_PG18_1.7.0.

Reproduction

LOAD 'age';
SET search_path = ag_catalog, public;
SELECT ag_catalog.create_graph('age_issue_case13');

SELECT *
FROM ag_catalog.cypher('age_issue_case13', $$
CREATE (c {id: 1001})-[:rt13]->(a {id: 1002})
$$) AS (v agtype);

SELECT *
FROM ag_catalog.cypher('age_issue_case13', $$
MATCH (c {id: 1001})
CREATE (c)-[:rt13]->(b {id: 1003})
$$) AS (v agtype);

SELECT *
FROM ag_catalog.cypher('age_issue_case13', $$
UNWIND [1] AS i
MATCH p = ()-[:rt13*..6]-(n)
DETACH DELETE n
RETURN i
$$) AS (i agtype);

Expected

The query completes and returns the scalar i for each matched path row.
Deleting the matched vertices must not make the scalar-only RETURN fail.

Actual

Apache AGE 1.7.0 reports an internal executor error instead of returning
the rows:

ERROR: add_valid_vertex_edges: no vertex found

Activity

  1. gregfelice commented on Aug 21, 2026

    @gregfelice
    Contributor

    I could not reproduce this on current master (4d9b2506, AGE 1.8.0, PostgreSQL 18.4). Running your reproducer verbatim, the final query returns the six rows you describe as expected, with no missing-vertex error:

     i
    ---
     1
     1
     1
     1
     1
     1
    (6 rows)
    

    Your report is against the apache/age:release_PG18_1.7.0 Docker image, so this looks fixed between 1.7.0 and 1.8.0 — though I want to be careful about naming a commit. I checked whether #2495 was responsible by rebuilding at 5f324f82, the commit immediately before it; the reproducer already passed there, so that is not the fix and I did not bisect further.

    Could you retest on 1.8.0 / master? If it still reproduces for you, the difference is environmental and worth chasing rather than closing.

  2. YGY-001 commented on Aug 21, 2026

    @YGY-001
    Author

    I could not reproduce this on current master (4d9b2506, AGE 1.8.0, PostgreSQL 18.4). Running your reproducer verbatim, the final query returns the six rows you describe as expected, with no missing-vertex error:

     i
    ---
     1
     1
     1
     1
     1
     1
    (6 rows)
    

    Your report is against the apache/age:release_PG18_1.7.0 Docker image, so this looks fixed between 1.7.0 and 1.8.0 — though I want to be careful about naming a commit. I checked whether #2495 was responsible by rebuilding at 5f324f82, the commit immediately before it; the reproducer already passed there, so that is not the fix and I did not bisect further.

    Could you retest on 1.8.0 / master? If it still reproduces for you, the difference is environmental and worth chasing rather than closing.

    You're right; it works fine in version 1.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions