Re: plpgsql_check_function issue after upgrade - Mailing list pgsql-general

From shashidhar Reddy
Subject Re: plpgsql_check_function issue after upgrade
Date
Msg-id CAH=zU4uwnfa5LgTTQZitgF1v0oSu9WJCVJ-t8CHy_6zdZEirzQ@mail.gmail.com
Whole thread Raw
In response to Re: plpgsql_check_function issue after upgrade  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: plpgsql_check_function issue after upgrade  (shashidhar Reddy <shashidharreddy001@gmail.com>)
List pgsql-general
Hello Pavel,

This is the function causing the issue on all servers, and also i noticed when I use plpgsql_check_function in any function I am facing the same issue.


On Tue, Nov 29, 2022 at 6:43 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
Hi


út 29. 11. 2022 v 13:49 odesílatel shashidhar Reddy <shashidharreddy001@gmail.com> napsal:
Hello,

Recently we have upgraded postgres from version 12 to 13 and upgraded  plpgsql_check to the latest version but after upgrade when calling the below function causing postgres restart .

CREATE OR REPLACE FUNCTION pro.po_check(
)
    RETURNS void
    LANGUAGE 'plpgsql'
    COST 100
    VOLATILE SECURITY DEFINER PARALLEL UNSAFE
AS $BODY$
DECLARE
BEGIN

    PERFORM p.oid, n.nspname, p.proname, plpgsql_check_function(p.oid)
    FROM pg_catalog.pg_namespace n
    JOIN pg_catalog.pg_proc p ON pronamespace = n.oid
    JOIN pg_catalog.pg_language l ON p.prolang = l.oid
    WHERE l.lanname = 'plpgsql' AND p.prorettype <> 2279
    and upper(n.nspname) like upper('Pro');

END;
$BODY$;

and the error in syslogs shows
kernel: [93631.415790] postgres[86383]: segfault at 80 ip 00007f07f3e3eefd sp 00007fffcf1db500 error 4 in plpgsql_check.so[7f07f3e2e000+34000]

it can be a bug in plpgsql_check. But I am not able to fix it without some information. Can you send the reproducer (minimal example of your code, that reproduce this error)?

Regards

Pavel

--
Shashidhar


--
Shashidhar

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: plpgsql_check_function issue after upgrade
Next
From: Pat Wright
Date:
Subject: #PGSQL Phriday #003