You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2021/03/09 05:08:08 UTC

[GitHub] [incubator-age] JunKK7 opened a new issue #39: Execute pl/pgsql disconnecting

JunKK7 opened a new issue #39:
URL: https://github.com/apache/incubator-age/issues/39


   Hello
   
   I'm trying to analyze AGE source for using create vertex on pl/pgsql.
   
   I tried this script
   
   `
   LOAD 'age';
   SET search_path = ag_catalog, age, public;
   
   select create_graph('test');
   
   SELECT * from cypher('test', $$
     CREATE (a:Part {id: '123',value: '1234'})
   $$) as (a agtype);
   
   SELECT * from cypher('test', $$
     MATCH (a:Part)
     RETURN a.value
   $$) as (a agtype);
   
   
   CREATE OR REPLACE FUNCTION public.create_graph4(
   	)
       RETURNS void
       LANGUAGE 'plpgsql'
   AS $BODY$
   begin
   	LOAD 'age';
   	SET search_path = ag_catalog, age, public;
   	SELECT * from cypher('test', $$ create(:Part{id:'1234',value:'12345'}) $$) as (a agtype);	
   end
   $BODY$;
   select public.create_graph4();
   
   `
   error 
   `2021-03-09 12:48:38.560 KST [24113] LOG:  server process (PID 26455) was terminated by signal 11: segmentation error
   2021-03-09 12:48:38.560 KST [24113] DETAIL:  Failed process was running: select public.create_graph4();
   2021-03-09 12:48:38.560 KST [24113] LOG:  terminating any other active server processes
   2021-03-09 12:48:38.561 KST [26449] WARNING:  terminating connection because of crash of another server process
   2021-03-09 12:48:38.561 KST [26449] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
   2021-03-09 12:48:38.561 KST [26449] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
   server closed the connection unexpectedly
           This probably means the server terminated abnormally
           before or while processing the request.
   The connection to the server was lost. Attempting reset: 2021-03-09 12:48:38.563 KST [26452] WARNING:  terminating connection because of crash of another server process
   2021-03-09 12:48:38.563 KST [26452] DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
   2021-03-09 12:48:38.563 KST [26452] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
   2021-03-09 12:48:38.564 KST [26457] FATAL:  the database system is in recovery mode
   Failed.
   !> 2021-03-09 12:48:38.565 KST [24113] LOG:  all server processes terminated; reinitializing
   2021-03-09 12:48:38.578 KST [26458] LOG:  database system was interrupted; last known up at 2021-03-09 12:46:40 KST
   2021-03-09 12:48:38.772 KST [26458] LOG:  database system was not properly shut down; automatic recovery in progress
   2021-03-09 12:48:38.774 KST [26458] LOG:  redo starts at 0/31CF228
   2021-03-09 12:48:38.791 KST [26458] LOG:  invalid record length at 0/337ADC8: wanted 24, got 0
   2021-03-09 12:48:38.791 KST [26458] LOG:  redo done at 0/337AD60
   2021-03-09 12:48:38.791 KST [26458] LOG:  last completed transaction was at log time 2021-03-09 12:48:37.494032+09
   2021-03-09 12:48:38.835 KST [24113] LOG:  database system is ready to accept connections
   `
   
   first start "select public.create_graph4();" -> disconnect
   second start "select public.create_graph4();" -> not disconnect
   third start "select public.create_graph4();" -> not disconnect
   
   why first time start "select public.create_graph4()" disconnected ?
   


----------------------------------------------------------------
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.

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



[GitHub] [incubator-age] JoshInnis commented on issue #39: Execute pl/pgsql disconnecting

Posted by GitBox <gi...@apache.org>.
JoshInnis commented on issue #39:
URL: https://github.com/apache/incubator-age/issues/39#issuecomment-793443283


   Hello,
   
   I believe this issue is related to issue #28: https://github.com/apache/incubator-age/issues/28
   
   In short: the data structure that preserves the information about a CREATE clause does not support moments where the current MemoryContext is destroyed. ie: prepared statements and PL/PGPSQL functionms.
   
   See Here: https://www.postgresql.org/docs/11/spi-memory.html
   
   We need the CREATE clause-- and REMOVE, SET, and eventually MERGE and DELETE (when these are implemented) clauses to store information on disk, so it can handle situations where information needs to be preserved beyond the specific context it was created in.
   
   We will keep this ticket open and updated until this issue is resolved.


----------------------------------------------------------------
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.

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



[GitHub] [incubator-age] JoshInnis closed issue #39: Execute pl/pgsql disconnecting

Posted by GitBox <gi...@apache.org>.
JoshInnis closed issue #39:
URL: https://github.com/apache/incubator-age/issues/39


   


-- 
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.

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



[GitHub] [incubator-age] JoshInnis commented on issue #39: Execute pl/pgsql disconnecting

Posted by GitBox <gi...@apache.org>.
JoshInnis commented on issue #39:
URL: https://github.com/apache/incubator-age/issues/39#issuecomment-811568336


   Hi,
   
   pl/pgsql Functions are now compatible with the CREATE, SET, REMOVE, and DELETE clauses. https://github.com/apache/incubator-age/commit/7ba89b01c8e249ae2df77854698fc87eec90dabb. This commit will be included in release 0.4.0.


-- 
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.

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



[GitHub] [incubator-age] JoshInnis edited a comment on issue #39: Execute pl/pgsql disconnecting

Posted by GitBox <gi...@apache.org>.
JoshInnis edited a comment on issue #39:
URL: https://github.com/apache/incubator-age/issues/39#issuecomment-793443283


   Hello,
   
   I believe this issue is related to issue #28
   
   In short: the data structure that preserves the information about a CREATE clause does not support moments where the current MemoryContext is destroyed. ie: prepared statements and PL/PGPSQL functionms.
   
   See Here: https://www.postgresql.org/docs/11/spi-memory.html
   
   We need the CREATE clause-- and REMOVE, SET, and eventually MERGE and DELETE (when these are implemented) clauses to store information on disk, so it can handle situations where information needs to be preserved beyond the specific context it was created in.
   
   We will keep this ticket open and updated until this issue is resolved.


----------------------------------------------------------------
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.

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