psql crash when running a procedure with an inout parameter and a commit

Поиск
Список
Период
Сортировка
От Chuck Nellis
Тема psql crash when running a procedure with an inout parameter and a commit
Дата
Msg-id BN1P110MB0579207C8864B99CE3367722A7FD9@BN1P110MB0579.NAMP110.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответы Re: psql crash when running a procedure with an inout parameter and a commit  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs

PostgreSQL folks,

 

I’d like to report a bug I encountered while running psql on PostgreSQL version 12.5, on RHEL 7.9.   I decomposed the problem down to this small example:

 

CREATE OR REPLACE PROCEDURE proc
(
   a_string INOUT VARCHAR
)
AS $$
<< proc >>
DECLARE
   val BIGINT;
BEGIN

   COMMIT;
   SELECT 0 INTO val;

END proc;
$$
LANGUAGE PLPGSQL;

CREATE OR REPLACE PROCEDURE proc_caller()
AS $$
<< proc_caller >>
DECLARE
   some_string VARCHAR := 'some_string';
BEGIN

   CALL proc(some_string);

END proc_caller;
$$
LANGUAGE PLPGSQL;

CALL proc_caller();

 

Upon running the final line, psql terminates with the following error:

 

SSL SYSCALL error: EOF detected

connection to server was lost

 

A few other observations I’ve made:

  1. Changing the a_string parameter from an INOUT type to IN type prevents the psql crash
  2. Removing the COMMIT prevents the psql crash
  3. Swapping the order of the SELECT and COMMIT prevents the psql crash

 

Thanks,

Chuck

В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17147: Why concat_ws and concat is not immutable?
Следующее
От: Rainer Tammer
Дата:
Сообщение: Re: Postgres 9.2.13 on AIX 7.1