From: | Chuck Nellis <crnellis(at)raytheon(dot)com> |
---|---|
To: | "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | psql crash when running a procedure with an inout parameter and a commit |
Date: | 2021-08-16 12:14:57 |
Message-ID: | BN1P110MB0579207C8864B99CE3367722A7FD9@BN1P110MB0579.NAMP110.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Rainer Tammer | 2021-08-16 13:07:33 | Re: Postgres 9.2.13 on AIX 7.1 |
Previous Message | PG Bug reporting form | 2021-08-16 12:03:48 | BUG #17147: Why concat_ws and concat is not immutable? |