You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "bilalsp (via GitHub)" <gi...@apache.org> on 2026/07/01 16:00:08 UTC
[I] Crash (Segmentation Fault) when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
bilalsp opened a new issue, #2450:
URL: https://github.com/apache/age/issues/2450
**Describe the bug**
Adding a GENERATED ALWAYS AS (...) STORED column to a vertex label table (_ag_label_vertex child table) causes a segmentation fault (signal 11) during Cypher CREATE / SET operations.
The crash occurs in the vertex creation path (likely during heap_insert in the executor).
**How are you accessing AGE (Command line, driver, etc.)?**
Directly via cypher() SQL function (IN psql client).
**What data setup do we need to do?**
```pgsql
-- 1. Create graph and label
SELECT create_graph('age_bug');
SELECT create_vlabel('age_bug', 'Product');
-- 2. Add generated column (this triggers the bug)
ALTER TABLE age_bug."Product"
ADD COLUMN category VARCHAR(25) GENERATED ALWAYS AS (agtype_access_operator(properties, '"category"')) STORED;
```
**What is the necessary configuration info needed?**
- [e.g. Installed PostGIS]
**What is the command that caused the error?**
```pgsql
SELECT * FROM cypher('age_bug', $$
CREATE (p:Product {category: 'disk', type: 'M1234', version: 1})
RETURN p
$$) AS (p agtype);
```
```
ERROR:
psql client log: SQL Error [08006]: An I/O error occurred while sending to the backend.
SERVER log:
LOG: server process (PID xxxx) was terminated by signal 11: Segmentation fault
DETAIL: Failed process was running: [the cypher CREATE query]
```
*Even though MATCH query does NOT RAISE ANY error*
```pgsql
SELECT * FROM cypher('age_bug', $$
MATCH (p:Product {category: 'disk', type: 'M1234', version: 1})
RETURN p
$$) AS (p agtype);
```
**Expected behavior**
AGE should support standard PostgreSQL features like generated columns on label TABLES
**Environment (please complete the following information):**
- AGE Version: release/PG15/1.5.0
- PostgreSQL Version: PostgreSQL 15.8 (Debian 15.8-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
- OS: Linux
**Additional context**
Add any other context about the problem here.
--
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: dev-unsubscribe@age.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "gregfelice (via GitHub)" <gi...@apache.org>.
gregfelice commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-4875526925
PR opened: #2458
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "MuhammadTahaNaveed (via GitHub)" <gi...@apache.org>.
MuhammadTahaNaveed closed issue #2450: [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns
URL: https://github.com/apache/age/issues/2450
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "bilalsp (via GitHub)" <gi...@apache.org>.
bilalsp closed issue #2450: [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns
URL: https://github.com/apache/age/issues/2450
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "gregfelice (via GitHub)" <gi...@apache.org>.
gregfelice commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-4875173347
On it
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "MuhammadTahaNaveed (via GitHub)" <gi...@apache.org>.
MuhammadTahaNaveed commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-5720047667
Hi @bilalsp, I’m helping with the releases now and will start with 1.8.0 for PG15 to get this fix out and unblock your project.
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "MuhammadTahaNaveed (via GitHub)" <gi...@apache.org>.
MuhammadTahaNaveed commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-4978724931
> [@MuhammadTahaNaveed](https://github.com/MuhammadTahaNaveed) when could we expect release with this fix for PG15?
@bilalsp The release process for AGE `1.8.0` on `PG 18 and 19` has already started. I’m not sure when the `PG 15` release process will begin. @jrgemignani can confirm, as he is handling the releases.
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "bilalsp (via GitHub)" <gi...@apache.org>.
bilalsp commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-4874869159
Hi @gregfelice
We're currently blocked by the segfault on GENERATED ALWAYS columns in vertex table and wanted to check whether you have plan to fix this issue anytime soon. If not, we would appreciate any guidance on a possible workaround. thanks!!!
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "bilalsp (via GitHub)" <gi...@apache.org>.
bilalsp commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-5871297294
Hello @gregfelice,
It seems that this fix has introduced the regression in PG15/1.8.0 release. I have created the bug issue on it https://github.com/apache/age/issues/2583
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "bilalsp (via GitHub)" <gi...@apache.org>.
bilalsp commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-4891657500
@gregfelice Thank you for resolving this issue.
@MuhammadTahaNaveed when could we expect release with this fix for PG15?
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "bilalsp (via GitHub)" <gi...@apache.org>.
bilalsp commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-5129368585
Hello @jrgemignani
When could we expect release with this fix for PG15? Actually, It is blocking us to make a release for our project.
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "bilalsp (via GitHub)" <gi...@apache.org>.
bilalsp commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-5716777256
Hello @MuhammadTahaNaveed,
I didn't receive any response from @jrgemignani. Do you have any update when we could expect the release with this fix for PG15?
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-5717567016
@bilalsp Hi! Sorry, I've just been very very busy. I'm trying to work on releases, but atm, I'm the only one and my focus has been on PG19, 18, and 17. The plan is to apply these fixes down to 14, but I don't have an estimate due to my workload on when that will happen.
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "bilalsp (via GitHub)" <gi...@apache.org>.
bilalsp commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-5451088097
Hello @jrgemignani
Any update, when this fix would be released for PG15? It has completely blocked me.
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "gregfelice (via GitHub)" <gi...@apache.org>.
gregfelice commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-4875513568
Thanks for the clear reproducer, @bilalsp — that made this quick to pin down.
**Root cause.** AGE's CREATE/MERGE/SET paths build the insert/update tuple slot from the full label-table descriptor but only populate the columns AGE manages (`id`/`properties` for vertices, `id`/`start_id`/`end_id`/`properties` for edges). Your `GENERATED ALWAYS ... STORED` column is an extra attribute AGE never initialized, so `heap_form_tuple()` read the uninitialized slot entry and segfaulted dereferencing garbage. The same happens for a plain added column, and on SET as well as CREATE.
**Fix** (PR incoming):
- The entity slot is now null-initialized before AGE fills its own columns, so any column AGE doesn't manage defaults to NULL instead of stale memory.
- Stored generated columns are computed via `ExecComputeStoredGenerated()` before the tuple is materialized — on insert (CREATE/MERGE) and recomputed on update (SET) — matching PostgreSQL semantics.
Verified against your exact repro plus a new regression test: your case now works and the generated column is correctly computed:
```
CREATE (p:Product {category: 'disk', ...}) --> "Product".category = 'disk'
MATCH (p:Product {category:'disk'}) SET p.category='ssd' --> recomputes to 'ssd'
```
**One caveat worth flagging:** on `SET`, AGE rebuilds the row from `id`/`properties`, so a *generated* column recomputes correctly, but a *plain* (non-generated) column would be reset to NULL. If you need a value preserved across updates, use a `GENERATED ... STORED` column derived from `properties` (as in your example) rather than a plain column — that path is fully supported.
**Workaround until the PR lands:** if you can't wait, computing `category` at query time via an expression index instead of a stored generated column avoids the crash:
```sql
CREATE INDEX ON age_bug."Product" ((agtype_access_operator(properties, '"category"')));
```
I'll link the PR here shortly.
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Segmentation Fault] when creating graph node whose vertex label table has GENERATED ALWAYS columns [age]
Posted by "bilalsp (via GitHub)" <gi...@apache.org>.
bilalsp commented on issue #2450:
URL: https://github.com/apache/age/issues/2450#issuecomment-4874882219
Hi @gregfelice
We're currently blocked by the segfault on GENERATED ALWAYS columns in vertex table and wanted to check whether you have plan to fix this issue anytime soon. If not, we would appreciate any guidance on a possible workaround. thanks!!!
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org