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

   
   
   ## Environment
   
   - Apache AGE `1.8.0`
   - PostgreSQL `18.6`
   - Image: `apache/age:release_PG18_1.8.0`
   - Direct PostgreSQL execution through `ag_catalog.cypher(...)`
   
   ## Setup
   
   Run on a fresh database:
   
   ```sql
   LOAD 'age';
   SET search_path = ag_catalog, public;
   SELECT ag_catalog.create_graph('age_case173_pure');
   
   SELECT *
   FROM ag_catalog.cypher('age_case173_pure', $$
     CREATE (:A {k10: true})-[:R {k10: true}]->(:l9)
   $$) AS (v agtype);
   ```
   
   ## LEFT — without `COUNT`
   
   ```sql
   SELECT *
   FROM ag_catalog.cypher('age_case173_pure', $$
     OPTIONAL MATCH (n1:A)-[r0:R]->(n0:l9)
     WHERE r0.k10 = true
     RETURN n1, r0, n0
   $$) AS (c0 agtype, c1 agtype, c2 agtype);
   ```
   
   ## RIGHT — with `COUNT`
   
   ```sql
   SELECT *
   FROM ag_catalog.cypher('age_case173_pure', $$
     OPTIONAL MATCH (n1:A)-[r0:R]->(n0:l9)
     WHERE r0.k10 = true
       AND COUNT {
         MATCH (x:A)-[rx:R]->(y:l9)
         WHERE rx.k10 = true
         UNWIND [true] AS __barrier_token
         WITH n1, r0, n0, x, rx, y
         RETURN {n1: n1, r0: r0, n0: n0, x: x, rx: rx, y: y} AS __layer_row
       } > 0
     RETURN n1, r0, n0
   $$) AS (c0 agtype, c1 agtype, c2 agtype);
   ```
   
   ## Expected
   
   Both queries return one row containing the matching `A` vertex, `R`
   relationship, and `l9` vertex. The `COUNT` subquery in RIGHT matches one row;
   the inserted `UNWIND` emits one row per input, and the following projection
   and map return preserve that row count.
   
   ## Actual
   
   LEFT returns one row and `psql` exits `0`. RIGHT terminates the PostgreSQL
   backend while processing the query; `psql` exits `2` with a lost connection.
   PostgreSQL logs `client backend ... was terminated by signal 11: Segmentation
   fault`. After recovery, the container remains running with `OOMKilled=false`
   and restart count `0`, and a new connection can run `SELECT 1`. 


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