-
Notifications
You must be signed in to change notification settings - Fork 467
Description
Describe the bug
For some strange reason, at exactly 42 vertex labels the drop_graph starts failing with "label (relation) cache corrupted". Note that the graph drop still happens, but the connection is returned broken and requires reconnection.
To reproduce you can run the query below that creates 44 vertexes. To see it not fail, remove around 6 and it should not fail on drop_graph
How are you accessing AGE (Command line, driver, etc.)?
- DBeaver (JDBC), sqlalchemy
What data setup do we need to do?
...
select * from ag_catalog.create_graph('test_labels_direct');
SELECT * from cypher('test_labels_direct', $$
CREATE (a1:Part1 {part_num: '123'}),
(a2:Part2 {part_num: '345'}),
(a3:Part3 {part_num: '456'}),
(a4:Part4 {part_num: '789'}),
(a5:Part5 {part_num: '123'}),
(a6:Part6 {part_num: '345'}),
(a7:Part7 {part_num: '456'}),
(a8:Part8 {part_num: '789'}),
(a9:Part9 {part_num: '123'}),
(a10:Part10 {part_num: '345'}),
(a11:Part11 {part_num: '456'}),
(a12:Part12 {part_num: '789'}),
(a13:Part13 {part_num: '123'}),
(a14:Part14 {part_num: '345'}),
(a15:Part15 {part_num: '456'}),
(a16:Part16 {part_num: '789'}),
(a17:Part17 {part_num: '123'}),
(a18:Part18 {part_num: '345'}),
(a19:Part19 {part_num: '456'}),
(a20:Part20 {part_num: '789'}),
(a21:Part21 {part_num: '123'}),
(a22:Part22 {part_num: '345'}),
(a23:Part23 {part_num: '456'}),
(a24:Part24 {part_num: '789'}),
(a25:Part25 {part_num: '123'}),
(a26:Part26 {part_num: '345'}),
(a27:Part27 {part_num: '456'}),
(a28:Part28 {part_num: '789'}),
(a29:Part29 {part_num: '789'}),
(a30:Part30 {part_num: '123'}),
(a31:Part31 {part_num: '345'}),
(a32:Part32 {part_num: '456'}),
(a33:Part33 {part_num: '789'}),
(a34:Part34 {part_num: '123'}),
(a35:Part35 {part_num: '345'}),
(a36:Part36 {part_num: '456'}),
(a37:Part37 {part_num: '789'}),
(a38:Part38 {part_num: '123'}),
(a39:Part39 {part_num: '345'}),
(a40:Part40 {part_num: '456'}),
(a41:Part41 {part_num: '789'}),
(a42:Part42 {part_num: '345'}),
(a43:Part43 {part_num: '456'}),
(a44:Part44 {part_num: '789'})
$$) as (a agtype);
...What is the necessary configuration info needed?
- None
What is the command that caused the error?
select * from ag_catalog.drop_graph('test_labels_direct', true);2025-11-14 01:50:57.946 UTC [472] ERROR: label (relation) cache corrupted
2025-11-14T01:50:57.946816366Z 2025-11-14 01:50:57.946 UTC [472] FATAL: terminating connection because protocol synchronization was lost
Expected behavior
Graph should drop with no errors and not break the connection.
Environment (please complete the following information):
- Version: Docker image apache/age:dev_snapshot_PG17
Additional context
Update Nov 14 3:40PM: I tried deleting 6 nodes and running drop_label() on them, bringing the total down to a smaller number that drop_graph now worked with no corruption. So a workaround can be to just make sure we remove the nodes and labels, though that kind of defeats the purpose of a drop_graph.