avowkind commented on issue #365:
URL: https://github.com/apache/age/issues/365#issuecomment-2046163110

   is it worth creating a new bug report? 
   
   **Describe the bug**
   A clear and concise description of what the bug is.
   
   It is possible to get the database into a state where a request of the form:
   
   ```pgsql
   SELECT * FROM cypher('fishpond', $$
   MATCH (p:PropertyType)<-[edge:typeOf*]-(node:PropertyType)
   WHERE p.id = 'fish_weight_g'
   RETURN node, edge
   $$) as ( node agtype, edge agtype);
   ```
   
   returns the error
   ```
   ERROR,XX000,"insert_vertex_edge: failed to insert"
   ```
   
   While the same request with [edge:typeOf] i.e no variable length path on the 
edge succeeds
   
   However, a second attempt in the same session will succeed. 
   
   Is is an instance of https://github.com/apache/age/issues/365 ( which was 
closed with insufficient information).
   
   **How are you accessing AGE (Command line, driver, etc.)?**
   - Can be reproduced in psql, PGAdmin and nodejs driver. 
   
   **What data setup do we need to do?**
   - I'm not sure I can reproduce this issue in a small example as it only 
occurred after some time of use with a large dataset.
   - however the same issue does appear in a db setup from a backup of the 
production db. i.e. I can provide an example if required although this is 
   
   **What is the necessary configuration info needed?**
   - docker image: apache/age:PG15_latest
   
   **What is the command that caused the error?**
   ```pgsql
   SELECT * FROM cypher('fishpond', $$
   MATCH (p:PropertyType)<-[edge:typeOf*]-(node:PropertyType)
   WHERE p.id = 'fish_weight_g'
   RETURN node, edge
   $$) as ( node agtype, edge agtype);
   ```
   ```
   ERROR,XX000,"insert_vertex_edge: failed to insert"
   ```
   
   **Expected behavior**
   on repeating the request we get back
   ```
   "{""id"": 844424930131972, ""label"": ""PropertyType"", ""properties"": 
{""id"": ""average_fish_weight_g"", ""name"": ""Average fish weight"", 
""published"": true, ""relations"": [{""id"": ""fish_weight_g"", ""relation"": 
""typeOf""}], ""resultType"": ""measurement"", ""description"": ""The average 
weight of the fish in the tank""}}::vertex"      "{""id"": 1125899906842627, 
""label"": ""typeOf"", ""end_id"": 844424930131971, ""start_id"": 
844424930131972, ""properties"": {}}::edge"
   "{""id"": 844424930131974, ""label"": ""PropertyType"", ""properties"": 
{""id"": ""culled_fish_weight_g"", ""name"": ""Fish Weight (culled)"", 
""units"": ""g"", ""published"": true, ""relations"": [{""id"": 
""fish_weight_g"", ""relation"": ""typeOf""}], ""resultType"": ""measurement"", 
""description"": ""Weight of fish after culling""}}::vertex"  "{""id"": 
1125899906842628, ""label"": ""typeOf"", ""end_id"": 844424930131971, 
""start_id"": 844424930131974, ""properties"": {}}::edge"
   "{""id"": 844424930131975, ""label"": ""PropertyType"", ""properties"": 
{""id"": ""mortality_fish_weight_g"", ""name"": ""Fish Weight (mortality)"", 
""units"": ""g"", ""published"": true, ""relations"": [{""id"": 
""fish_weight_g"", ""relation"": ""typeOf""}], ""resultType"": ""measurement"", 
""description"": ""Weight of dead fish""}}::vertex"     "{""id"": 
1125899906842629, ""label"": ""typeOf"", ""end_id"": 844424930131971, 
""start_id"": 844424930131975, ""properties"": {}}::edge"
   "{""id"": 844424930131976, ""label"": ""PropertyType"", ""properties"": 
{""id"": ""sampled_live_fish_weight_g"", ""name"": ""Fish Weight (sampled)"", 
""units"": ""g"", ""published"": true, ""relations"": [{""id"": 
""fish_weight_g"", ""relation"": ""typeOf""}], ""resultType"": ""measurement"", 
""description"": ""Weight of live sampled fish""}}::vertex"    "{""id"": 
1125899906842630, ""label"": ""typeOf"", ""end_id"": 844424930131971, 
""start_id"": 844424930131976, ""properties"": {}}::edge"
   "{""id"": 844424930131977, ""label"": ""PropertyType"", ""properties"": 
{""id"": ""morphometric_fish_weight_g"", ""name"": ""Fish Weight 
(morphometric)"", ""units"": ""g"", ""published"": true, ""relations"": 
[{""id"": ""fish_weight_g"", ""relation"": ""typeOf""}], ""resultType"": 
""measurement"", ""description"": ""Weight of live fish in tank calculated from 
morphometric imaging""}}::vertex"  "{""id"": 1125899906842631, ""label"": 
""typeOf"", ""end_id"": 844424930131971, ""start_id"": 844424930131977, 
""properties"": {}}::edge"
   ```
   
   
   


-- 
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-unsubscr...@age.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to