You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "devcode100 (via GitHub)" <gi...@apache.org> on 2024/05/06 14:16:38 UTC
[I] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
devcode100 opened a new issue, #1837:
URL: https://github.com/apache/age/issues/1837
**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?**
```pgsql
SELECT * FROM cypher('DTwin', $$
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.
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2207291138
@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=#
```
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2097037061
> The volume of data is <100 (total number of Nodes across various Labels).
Roughly, how many distinct labels?
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2207273611
@dhilst Thank you for the information, I will see if I can repeat 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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2101255533
@devcode100 I have tried this against PostgreSQL version 16.2 and release 1.5.0, without issue -
```
psql-16.2-5432-pgsql=# drop extension age; create extension age; load 'age'; set search_path TO ag_catalog;
DROP EXTENSION
CREATE EXTENSION
LOAD
SET
psql-16.2-5432-pgsql=# select * from create_graph('test');
NOTICE: graph "test" has been created
create_graph
--------------
(1 row)
psql-16.2-5432-pgsql=# DO
$do$
BEGIN
FOR i in 1..10000000 LOOP
PERFORM * FROM cypher('test', $$ CREATE (:Category {name: 'CategoryTest1'}) CREATE (:Category {name: 'CategoryTest2'}) CREATE (:Category2 {name: 'CategoryTest1'}) CREATE (:Category2 {name: 'CategoryTest2'}) $$) AS (result agtype);
end LOOP;
end
$do$;
DO
psql-16.2-5432-pgsql=# select * from cypher('test', $$ match (u) return count(u) $$) as (result agtype);
result
----------
40000000
(1 row)
psql-16.2-5432-pgsql=#
```
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2207356787
@dhilst This issue is that you aren't creating a vlabel for the label you are importing from the CSV. Note how the regression tests do the load -
```
SELECT create_graph('agload_test_graph');
SELECT create_vlabel('agload_test_graph','Country');
SELECT load_labels_from_file('agload_test_graph', 'Country',
'age_load/countries.csv');
SELECT create_vlabel('agload_test_graph','City');
SELECT load_labels_from_file('agload_test_graph', 'City',
'age_load/cities.csv');
SELECT create_elabel('agload_test_graph','has_city');
SELECT load_edges_from_file('agload_test_graph', 'has_city',
'age_load/edges.csv');
```
If applied to your issue -
```
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=# 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=# SELECT create_vlabel('test_graph','Cities');
NOTICE: VLabel "Cities" has been created
create_vlabel
---------------
(1 row)
psql-16.2-5432-psql=# select load_labels_from_file('test_graph', 'Cities', '/home/jgemignani/POSTGRESQL/cities.csv');
load_labels_from_file
-----------------------
(1 row)
psql-16.2-5432-psql=#
```
The issue is that the label you are importing the vertices or edges into, doesn't exist.
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "devcode100 (via GitHub)" <gi...@apache.org>.
devcode100 commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2097451354
> > The volume of data is <100 (total number of Nodes across various Labels).
>
> Roughly, how many distinct labels?
**There is roughly **26** distinct labels.** The size of data 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
```pgsql
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.
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2336488509
This issue is stale because it has been open 60 days with no activity. Remove "Abondoned" label or comment or this will be closed in 14 days.
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2365372283
This issue was closed because it has been stalled for further 14 days with no activity.
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2099496759
@devcode100 I have not been able to reproduce this and I created 120,000 nodes as shown below, in both the latest and PG16 release 1.5.0. It could be that your install got messed up?
```
psql-16.1-5432-pgsql=# DO
$do$
BEGIN
FOR i in 1..100000 LOOP
PERFORM * FROM cypher('test', $$ CREATE (:Category {name: 'CategoryTest1'}) CREATE (:Category {name: 'CategoryTest2'}) CREATE (:Category2 {name: 'CategoryTest1'}) CREATE (:Category2 {name: 'CategoryTest2'}) $$) AS (n agtype);
end LOOP;
end
$do$;
DO
psql-16.1-5432-pgsql=# DO
$do$
BEGIN
FOR i in 1..100000 LOOP
PERFORM * FROM cypher('test', $$ CREATE (:Category {name: 'CategoryTest1'}) CREATE (:Category {name: 'CategoryTest2'}) CREATE (:Category2 {name: 'CategoryTest1'}) CREATE (:Category2 {name: 'CategoryTest2'}) $$) AS (n agtype);
end LOOP;
end
$do$;
DO
psql-16.1-5432-pgsql=# DO
$do$
BEGIN
FOR i in 1..100000 LOOP
PERFORM * FROM cypher('test', $$ CREATE (:Category {name: 'CategoryTest1'}) CREATE (:Category {name: 'CategoryTest2'}) CREATE (:Category2 {name: 'CategoryTest1'}) CREATE (:Category2 {name: 'CategoryTest2'}) $$) AS (n agtype);
end LOOP;
end
$do$;
DO
psql-16.1-5432-pgsql=# select * from cypher('test', $$ match (u) return count(u) $$) as (result agtype);
result
---------
1200000
(1 row)
psql-16.1-5432-pgsql=#
```
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "dhilst (via GitHub)" <gi...@apache.org>.
dhilst commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2191643695
I'm facing the same error but while trying to use `load_labels_from_file`. I'm using the age docker 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
```
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "dhilst (via GitHub)" <gi...@apache.org>.
dhilst commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2217841628
Hi @jrgemignani Thanks for the answer.
Yes it works for the vertices, and the documentation states the creation of the labels before loading the file, I'm sorry I missed that. Anyway, now I'm having the same problem with the edges, and creating the _elabel_ before the `load_edges_from_file` is not helping

I don't know if I'm missing something. These lines are in the documentation and your comment https://github.com/apache/age/issues/1837#issuecomment-2207356787 I double-checked it, and it looks right to me, let me know if you want me to test something. I'm using the same docker image as before, I recreated the container to ensure that I have the extension that comes from the image and not the compiled from source from the previous test.
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "devcode100 (via GitHub)" <gi...@apache.org>.
devcode100 commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2098831499
@jrgemignani , Both through **psql** cli and **DBearver**(SQL GUI Client), getting the issue.
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2098712393
@devcode100 This is happening when using the command line in PostgreSQL?
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2101208196
@devcode100 I have tried this against PostgreSQL version 16.2 and the **master** branch, without issue -
```
psql-16.2-5432-pgsql=# drop extension age; create extension age; load 'age'; set search_path TO ag_catalog;
DROP EXTENSION
CREATE EXTENSION
LOAD
SET
psql-16.2-5432-pgsql=# select * from create_graph('test');
NOTICE: graph "test" has been created
create_graph
--------------
(1 row)
psql-16.2-5432-pgsql=# DO
$do$
BEGIN
FOR i in 1..10000000 LOOP
PERFORM * FROM cypher('test', $$ CREATE (:Category {name: 'CategoryTest1'}) CREATE (:Category {name: 'CategoryTest2'}) CREATE (:Category2 {name: 'CategoryTest1'}) CREATE (:Category2 {name: 'CategoryTest2'}) $$) AS (result agtype);
end LOOP;
end
$do$;
DO
psql-16.2-5432-pgsql=# select * from cypher('test', $$ match (u) return count(u) $$) as (result agtype);
result
----------
40000000
(1 row)
psql-16.2-5432-pgsql=#
```
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "devcode100 (via GitHub)" <gi...@apache.org>.
devcode100 commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2102785662
@jrgemignani - I have dropped the Graph where I got the issue and working on new Graph schema now. I have not encountered the issue so far.
But to be frank the issue seemed weird and I still feel there is a corner case which triggers the issue.
Even I couldn't replicate the issue( means in the new Graph).
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #1837: SQL Error [22023]: ERROR: label_id must be 1 .. 65535
URL: https://github.com/apache/age/issues/1837
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2099514050
@devcode100 I should note that, for each of my tests, I used fresh installs of PostgreSQL version 16.1 and Apache AGE **master** and release 1.5.0. I'm not sure what specific version of 16 you are using, though.
Here I have created over 13M nodes without issue -
```
psql-16.1-5432-pgsql=# select * from cypher('test', $$ match (u) return count(u) $$) as (result agtype);
result
----------
13600000
(1 row)
psql-16.1-5432-pgsql=#
```
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "devcode100 (via GitHub)" <gi...@apache.org>.
devcode100 commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2099800078
@jrgemignani , appreciate your effort to replicate.
The current postgres server setup have is a single node one and I haven't encountered any issues with DB so far.
I would suggest to keep the issue open(at least till ~2 releases ) as its critical for us to monitor the AGE extension as we are planning to move to production with the same.
--
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] SQL Error [22023]: ERROR: label_id must be 1 .. 65535 [age]
Posted by "dhilst (via GitHub)" <gi...@apache.org>.
dhilst commented on issue #1837:
URL: https://github.com/apache/age/issues/1837#issuecomment-2191637916
I'm facing the same error while trying to load the nodes from a CSV

I'm using the docker image. The `cities.csv` is the same as in the repo https://github.com/apache/age/blob/master/regress/age_load/data/cities.csv
```
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
- ```
--
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