age: SQL Error [22023]: ERROR: label_id must be 1 .. 65535

Describe the bug Upon trying to create new Nodes, getting the below error: SQL Error [22023]: ERROR: label_id must be 1 … 65535 The issue is very specific to Nodes whose Labels are already existing, If I try to create Nodes with new Labels, no issues. The volume of data is <100 (total number of Nodes across various Labels). There is no steps I could think of to replicate this issue, it came randomly and exists.

How are you accessing AGE (Command line, driver, etc.)?

  • DBeaver, AGE Viewer

What is the necessary configuration info needed?

  • Postgres 16

What is the command that caused the error?

SELECT * FROM cypher('SchemaGraph', $$
CREATE (:Category {name: 'CategoryTest1'})
CREATE (:Category {name: 'CategoryTest2'})
$$) AS (n agtype);
SQL Error [22023]: ERROR: label_id must be 1 .. 65535

Expected behavior The Nodes should have been created.

Environment (please complete the following information):

  • Release v1.5.0 for PG16

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

@dhilst I was able to reproduce it, see below. I will try to find a resolution.

psql-16.2-5432-psql=# drop extension age; create extension age; load 'age'; set search_path TO ag_catalog;
DROP EXTENSION
CREATE EXTENSION
LOAD
SET
psql-16.2-5432-psql=# \dx age
             List of installed extensions
 Name | Version |   Schema   |      Description
------+---------+------------+------------------------
 age  | 1.5.0   | ag_catalog | AGE database extension
(1 row)

psql-16.2-5432-psql=# select create_graph('test_graph');
NOTICE:  graph "test_graph" has been created
 create_graph
--------------

(1 row)

psql-16.2-5432-psql=# select load_labels_from_file('test_graph', 'Cities', '/home/jgemignani/POSTGRESQL/cities.csv');
ERROR:  label_id must be 1 .. 65535
psql-16.2-5432-psql=#

I’m facing the same error but while trying to use load_labels_from_file. I’m using the age docker image

image

services:
  age:
    image: apache/age
    container_name: age
    environment:
      - POSTGRES_USER=postgresUser
      - POSTGRES_PASSWORD=postgresPW
      - POSTGRES_DB=postgresDB
    ports:
      - "5430:5432"
    dns:
      - 8.8.8.8
      - 8.8.4.4

The CSV is the one in the repo https://github.com/apache/age/blob/master/regress/age_load/data/cities.csv

I don’t know if the image ID helps in anything but here is it

$ docker image ls apache/age
REPOSITORY   TAG       IMAGE ID       CREATED       SIZE
apache/age   latest    fb44b5789198   5 weeks ago   1.5GB

The version of the extension is 1.5.0. I’ll look at how to compile from the sources in the meanwhile

image


edit

I build the extension from the source code, then ran drop extension age replace the age.so in the postgres folder and tried everything again, same error.

The last commit

d73d3eba (HEAD -> master, origin/master, origin/HEAD) Fix issue 1910: Server crashes when using exists(vle path) (#1924)

I don’t know what else to try, let me know if you want me to test something 👍

@jrgemignani , Both through psql cli and DBearver(SQL GUI Client), getting the issue.

The volume of data is <100 (total number of Nodes across various Labels).

Roughly, how many distinct labels?

   SELECT count(id) FROM ag_catalog.ag_label al; --26
   SELECT max(id) FROM ag_catalog.ag_label al ; --26

There is roughly 26 distinct labels.(The size of data set is very small).

Edit: Additionally, how are you inserting all of these nodes I am not doing any bulk insertions rather very simple node creations. E.g:- The below query will create issue

SELECT * FROM cypher('SchemaGraph', $$
CREATE (:Category {name: 'CategoryTest1'})
$$) AS (n agtype);

The issue is very specific to Nodes whose Labels are already existing, If I try to create Nodes with new Labels, no issues.