Re: plpgsql_check_function issue after upgrade

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: shashidhar Reddy <shashidharreddy001(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: plpgsql_check_function issue after upgrade
Date: 2022-11-30 04:34:19
Message-ID: CAFj8pRDZ4z4T0z6iAcpokkD-vz43Xq7Q2qCJUtg-vABGZshUhw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

st 30. 11. 2022 v 5:28 odesílatel Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
napsal:

>
>
> st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
> shashidharreddy001(at)gmail(dot)com> napsal:
>
>> I have tried updating after upgrade but that wasn't working, so I have
>> dropped and recreated the extension.
>> Now it is crashing every time when we call the function.
>>
>
> what is version od plpgsql_check on Postgres 12, what is version of
> plpgsql_check on Postgres 13 (with version of minor release)?
>
> Can you send backtrace?
> https://wiki.postgresql.org/wiki/Getting_a_stack_trace_of_a_running_PostgreSQL_backend_on_Linux/BSD
>

Do you have installed some other extensions?

>
>
>
>
>
>>
>> On Tue, 29 Nov, 2022, 9:58 pm Pavel Stehule, <pavel(dot)stehule(at)gmail(dot)com>
>> wrote:
>>
>>>
>>>
>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>>> shashidharreddy001(at)gmail(dot)com> napsal:
>>>
>>>> Plogsql check version is 2.2 and one more finding is before calling the
>>>> function if we drop and recreate the plpgsql_check extension there is no
>>>> issue, but each time we can't drop and create.
>>>>
>>>
>>> Maybe you need to run ALTER EXTENSION plpgsql_check UPDATE before first
>>> usage in pg 13
>>>
>>> If the extension works after re-installation, then the problem is not in
>>> an extension.
>>>
>>>
>>>
>>>> On Tue, 29 Nov, 2022, 7:19 pm shashidhar Reddy, <
>>>> shashidharreddy001(at)gmail(dot)com> wrote:
>>>>
>>>>> 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(dot)stehule(at)gmail(dot)com>
>>>>> wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>>
>>>>>> út 29. 11. 2022 v 13:49 odesílatel shashidhar Reddy <
>>>>>> shashidharreddy001(at)gmail(dot)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
>>>>>
>>>>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2022-11-30 08:37:09 Re: PostgreSQL extension for processing Graph queries (Apache AGE)
Previous Message Pavel Stehule 2022-11-30 04:28:54 Re: plpgsql_check_function issue after upgrade