[Bug] PG15/1.8.0 regression: query with variable-length edge (VLE) traversal failed
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 50/100
Hướng nghiên cứu
Start by running the provided cypher() reproduction on PostgreSQL 15 with AGE 1.8.0, then inspect the variable-length traversal planner associated with the regression from issue 2450. Done means the generated-column setup no longer raises the attribute-mapping error and both zero-hop and subsequent graph layers return successfully.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Executing a variable-length edge (VLE) traversal that starts with a zero-hop evaluation (*0..) triggers an unexpected relational engine crash: ERROR: Invalid number of attributes for <graph_name>.<vertex_label_name>. Even though the vertex and edge tables exist and are populated, the internal VLE execution planner fails to map the column definitions of the target label table when matching variable-length paths. This is a severe regression introduced in the PG15/1.8.0 release due to this fix https://github.com/apache/age/issues/2450.
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?
-- 1. Create a fresh graph and register both vertex and edge labels
SELECT create_graph('age_bug');
SELECT create_vlabel('age_bug', 'Product');
SELECT create_elabel('age_bug', 'HAVE');
-- 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;
-- 3. Populate data with three linked dummy products forming a continuous path
SELECT * FROM cypher('age_bug', $$
CREATE (p1:Product {category: 'device', type: 'D123', version: 1})
CREATE (p2:Product {category: 'cpu', type: 'I123', version: 1})
CREATE (p3:Product {category: 'chip', type: 'C123', version: 1})
// Create the structural edge links between them
CREATE (p1)-[:HAVE]->(p2)
CREATE (p2)-[:HAVE]->(p3)
$$) AS (_ agtype);
What is the necessary configuration info needed?
- No configuration needed
What is the command that caused the error?
SELECT * FROM cypher('age_bug', $$
MATCH (_:Product { category: 'device', type: 'D123', version: 1 })-[have_path:HAVE*1..]->(product:Product)
RETURN product
$$)
AS (node agtype);
ERROR:
psql client log:
SQL Error [42P01]: ERROR: Invalid number of attributes for age_bug.Product
server log:
ERROR: Invalid number of attributes for age_bug.Product
STATEMENT: SELECT * FROM cypher('age_bug', $$
MATCH (_:Product { category: 'device', type: 'D123', version: 1 })-[have_path:HAVE*1..]->(product:Product)
RETURN product
$$)
AS (node agtype)
Expected behavior
The query execution should succeed without a schema exception. For a *0.. quantifier, it should evaluate the initial root matched node as a valid 0-hop result set, and then cleanly walk down the 1-hop and 2-hop graph layers instead of crashing with a table attribute mapping mismatch.
Environment (please complete the following information):
- AGE Version: release/PG15/1.8.0
admin=> \dx age;
List of installed extensions
Name | Version | Schema | Description
------+---------+------------+------------------------
age | 1.8.0 | ag_catalog | AGE database extension
(1 row)
- 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.
- Ngôn ngữ chính
- C
- Star
- 4.9k
- Fork
- 532
- Merge trung bình
- 9 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/age
-
Integer division by -1 on INT64_MIN raises a misclassified floating-point exception (22P01) instead of bigint out of rangeCó thể đã có người làm @sean0407 đã nhận 4 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Performance regression in 1.8.0: every Cypher DELETE costs ~1 ms per edge label in the graphĐang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 2 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
area:gates bug good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
InauguralSystems/EigenScript#1782 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
intel/intel-device-plugins-for-kubernetes#2384 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
zephyrproject-rtos/zephyr#122261 ·
Maintainer thường phản hồi trong vòng 3 ngày