apache / apache/age

`CREATE` followed by a `WITH` constant `CONTAINS` predicate causes a PostgreSQL backend segmentation fault

Open
#2,535 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
4.8k
Forks
523
Avg merge
1d 2h
Merged PRs (30d)
9

Description

Docker image `apache/age:release_PG18_1.7.0

**Reproduction**

```sql
LOAD 'age';
SET search_path = ag_catalog, public;
SELECT ag_catalog.create_graph('age_issue_case9');

SELECT *
FROM ag_catalog.cypher('age_issue_case9', $$
CREATE (n)
WITH 1 AS y
WHERE ('zrEJOrLh' CONTAINS (('E' + 'J') + 'OrL'))
RETURN y
$$) AS (y agtype);
```

**Expected**

The query returns one row containing `1` and PostgreSQL remains available.

**Actual**

```text
server closed the connection unexpectedly
client backend ... was terminated by signal 11: Segmentation fault

Contributor guide

Open the contributing guide

Research direction

Start by running the SQL reproduction in the issue with Docker image apache/age:release_PG18_1.7.0 and confirm the CREATE/WITH/CONTAINS query causes the PostgreSQL backend to segfault. Trace the failing path from that query, then verify that it returns one row containing 1 and PostgreSQL remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, docker, postgresql
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.