pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedplpgsql_check_function issue after upgrade
20+ messages / 3 participants
[nested] [flat]
* plpgsql_check_function issue after upgrade
@ 2022-11-29 12:48 shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: shashidhar Reddy @ 2022-11-29 12:48 UTC (permalink / raw)
To: pgsql-general
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]
--
Shashidhar
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
@ 2022-11-29 13:12 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Stehule @ 2022-11-29 13:12 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
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
>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-11-29 13:49 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: shashidhar Reddy @ 2022-11-29 13:49 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: 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
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
@ 2022-11-29 15:37 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: shashidhar Reddy @ 2022-11-29 15:37 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-general
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.
On Tue, 29 Nov, 2022, 7:19 pm shashidhar Reddy, <
shashidharreddy001@gmail.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.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
>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
@ 2022-11-29 16:28 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 12:21 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 2 replies; 20+ messages in thread
From: Pavel Stehule @ 2022-11-29 16:28 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
shashidharreddy001@gmail.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@gmail.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.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
>>
>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-11-30 00:38 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
1 sibling, 1 reply; 20+ messages in thread
From: shashidhar Reddy @ 2022-11-30 00:38 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-general
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.
On Tue, 29 Nov, 2022, 9:58 pm Pavel Stehule, <pavel.stehule@gmail.com>
wrote:
>
>
> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
> shashidharreddy001@gmail.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@gmail.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.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
>>>
>>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
@ 2022-11-30 04:28 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 04:34 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Stehule @ 2022-11-30 04:28 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
shashidharreddy001@gmail.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
>
> On Tue, 29 Nov, 2022, 9:58 pm Pavel Stehule, <pavel.stehule@gmail.com>
> wrote:
>
>>
>>
>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>> shashidharreddy001@gmail.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@gmail.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.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
>>>>
>>>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-11-30 04:34 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 05:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Stehule @ 2022-11-30 04:34 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
st 30. 11. 2022 v 5:28 odesílatel Pavel Stehule <pavel.stehule@gmail.com>
napsal:
>
>
> st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
> shashidharreddy001@gmail.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.stehule@gmail.com>
>> wrote:
>>
>>>
>>>
>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>>> shashidharreddy001@gmail.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@gmail.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.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
>>>>>
>>>>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 04:34 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-12-05 05:49 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 05:57 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: shashidhar Reddy @ 2022-12-05 05:49 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-general
Pavel,
Where can I get list-dbgsym-packages.sh script?
On Wed, Nov 30, 2022 at 10:04 AM Pavel Stehule <pavel.stehule@gmail.com>
wrote:
>
>
> st 30. 11. 2022 v 5:28 odesílatel Pavel Stehule <pavel.stehule@gmail.com>
> napsal:
>
>>
>>
>> st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
>> shashidharreddy001@gmail.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.stehule@gmail.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>>>> shashidharreddy001@gmail.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@gmail.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.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
>>>>>>
>>>>>
--
Shashidhar
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 04:34 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 05:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
@ 2022-12-05 05:57 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 07:41 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Stehule @ 2022-12-05 05:57 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
Hi
po 5. 12. 2022 v 6:49 odesílatel shashidhar Reddy <
shashidharreddy001@gmail.com> napsal:
> Pavel,
>
> Where can I get list-dbgsym-packages.sh script?
>
https://manpages.debian.org/testing/debian-goodies/find-dbgsym-packages.1.en.html
https://wiki.ubuntu.com/DebuggingProgramCrash
please, don't use top-post style in this mailing list
https://en.wikipedia.org/wiki/Posting_style
Regards
Pavel
> On Wed, Nov 30, 2022 at 10:04 AM Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
>
>>
>>
>> st 30. 11. 2022 v 5:28 odesílatel Pavel Stehule <pavel.stehule@gmail.com>
>> napsal:
>>
>>>
>>>
>>> st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
>>> shashidharreddy001@gmail.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.stehule@gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>>>>> shashidharreddy001@gmail.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@gmail.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.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
>>>>>>>
>>>>>>
>
> --
> Shashidhar
>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 04:34 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 05:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 05:57 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-12-05 07:41 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 08:05 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: shashidhar Reddy @ 2022-12-05 07:41 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-general
Pavel,
Below is the back trace result
libffi6-dbg libgcc1-dbg libkrb5-dbg libstdc++6-8-dbg libxml2-dbg
postgresql-13-dbgsym postgresql-13-pldeb
ugger-dbgsym zlib1g-dbg
On Mon, Dec 5, 2022 at 11:28 AM Pavel Stehule <pavel.stehule@gmail.com>
wrote:
> Hi
>
>
> po 5. 12. 2022 v 6:49 odesílatel shashidhar Reddy <
> shashidharreddy001@gmail.com> napsal:
>
>> Pavel,
>>
>> Where can I get list-dbgsym-packages.sh script?
>>
>
>
> https://manpages.debian.org/testing/debian-goodies/find-dbgsym-packages.1.en.html
>
> https://wiki.ubuntu.com/DebuggingProgramCrash
>
> please, don't use top-post style in this mailing list
> https://en.wikipedia.org/wiki/Posting_style
>
> Regards
>
> Pavel
>
>
>
>> On Wed, Nov 30, 2022 at 10:04 AM Pavel Stehule <pavel.stehule@gmail.com>
>> wrote:
>>
>>>
>>>
>>> st 30. 11. 2022 v 5:28 odesílatel Pavel Stehule <pavel.stehule@gmail.com>
>>> napsal:
>>>
>>>>
>>>>
>>>> st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
>>>> shashidharreddy001@gmail.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.stehule@gmail.com>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>>>>>> shashidharreddy001@gmail.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@gmail.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.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
>>>>>>>>
>>>>>>>
>>
>> --
>> Shashidhar
>>
>
--
Shashidhar
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 04:34 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 05:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 05:57 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 07:41 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
@ 2022-12-05 08:05 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 10:24 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Stehule @ 2022-12-05 08:05 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
po 5. 12. 2022 v 8:42 odesílatel shashidhar Reddy <
shashidharreddy001@gmail.com> napsal:
> Pavel,
>
> Below is the back trace result
>
> libffi6-dbg libgcc1-dbg libkrb5-dbg libstdc++6-8-dbg libxml2-dbg
> postgresql-13-dbgsym postgresql-13-pldeb
> ugger-dbgsym zlib1g-dbg
>
I am sorry, I don't anything
>
> On Mon, Dec 5, 2022 at 11:28 AM Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
>
>> Hi
>>
>>
>> po 5. 12. 2022 v 6:49 odesílatel shashidhar Reddy <
>> shashidharreddy001@gmail.com> napsal:
>>
>>> Pavel,
>>>
>>> Where can I get list-dbgsym-packages.sh script?
>>>
>>
>>
>> https://manpages.debian.org/testing/debian-goodies/find-dbgsym-packages.1.en.html
>>
>> https://wiki.ubuntu.com/DebuggingProgramCrash
>>
>> please, don't use top-post style in this mailing list
>> https://en.wikipedia.org/wiki/Posting_style
>>
>> Regards
>>
>> Pavel
>>
>>
>>
>>> On Wed, Nov 30, 2022 at 10:04 AM Pavel Stehule <pavel.stehule@gmail.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> st 30. 11. 2022 v 5:28 odesílatel Pavel Stehule <
>>>> pavel.stehule@gmail.com> napsal:
>>>>
>>>>>
>>>>>
>>>>> st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
>>>>> shashidharreddy001@gmail.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.stehule@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>>>>>>> shashidharreddy001@gmail.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@gmail.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.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
>>>>>>>>>
>>>>>>>>
>>>
>>> --
>>> Shashidhar
>>>
>>
>
> --
> Shashidhar
>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 04:34 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 05:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 05:57 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 07:41 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 08:05 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-12-05 10:24 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 10:30 ` Re: plpgsql_check_function issue after upgrade Karsten Hilbert <Karsten.Hilbert@gmx.net>
2022-12-05 12:15 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 2 replies; 20+ messages in thread
From: shashidhar Reddy @ 2022-12-05 10:24 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-general
Is there any way to get the older version 1.1 of plpgsql_check to install
it?
On Mon, 5 Dec, 2022, 1:36 pm Pavel Stehule, <pavel.stehule@gmail.com> wrote:
>
>
> po 5. 12. 2022 v 8:42 odesílatel shashidhar Reddy <
> shashidharreddy001@gmail.com> napsal:
>
>> Pavel,
>>
>> Below is the back trace result
>>
>> libffi6-dbg libgcc1-dbg libkrb5-dbg libstdc++6-8-dbg libxml2-dbg
>> postgresql-13-dbgsym postgresql-13-pldeb
>> ugger-dbgsym zlib1g-dbg
>>
>
> I am sorry, I don't anything
>
>
>
>>
>> On Mon, Dec 5, 2022 at 11:28 AM Pavel Stehule <pavel.stehule@gmail.com>
>> wrote:
>>
>>> Hi
>>>
>>>
>>> po 5. 12. 2022 v 6:49 odesílatel shashidhar Reddy <
>>> shashidharreddy001@gmail.com> napsal:
>>>
>>>> Pavel,
>>>>
>>>> Where can I get list-dbgsym-packages.sh script?
>>>>
>>>
>>>
>>> https://manpages.debian.org/testing/debian-goodies/find-dbgsym-packages.1.en.html
>>>
>>> https://wiki.ubuntu.com/DebuggingProgramCrash
>>>
>>> please, don't use top-post style in this mailing list
>>> https://en.wikipedia.org/wiki/Posting_style
>>>
>>> Regards
>>>
>>> Pavel
>>>
>>>
>>>
>>>> On Wed, Nov 30, 2022 at 10:04 AM Pavel Stehule <pavel.stehule@gmail.com>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> st 30. 11. 2022 v 5:28 odesílatel Pavel Stehule <
>>>>> pavel.stehule@gmail.com> napsal:
>>>>>
>>>>>>
>>>>>>
>>>>>> st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
>>>>>> shashidharreddy001@gmail.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.stehule@gmail.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>>>>>>>> shashidharreddy001@gmail.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@gmail.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.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
>>>>>>>>>>
>>>>>>>>>
>>>>
>>>> --
>>>> Shashidhar
>>>>
>>>
>>
>> --
>> Shashidhar
>>
>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 04:34 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 05:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 05:57 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 07:41 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 08:05 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 10:24 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
@ 2022-12-05 10:30 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
1 sibling, 0 replies; 20+ messages in thread
From: Karsten Hilbert @ 2022-12-05 10:30 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: Pavel Stehule <pavel.stehule@gmail.com>; pgsql-general
Am Mon, Dec 05, 2022 at 03:54:28PM +0530 schrieb shashidhar Reddy:
> Is there any way to get the older version 1.1 of plpgsql_check to install
> it?
Is there any way to get you to respect the kind requests to
follow this list's posting customs as expressed by the very
people you want to help you ?
Such as not to top post.
Best regards,
Karsten
> On Mon, 5 Dec, 2022, 1:36 pm Pavel Stehule, <pavel.stehule@gmail.com> wrote:
>
> >
> >
> > po 5. 12. 2022 v 8:42 odesílatel shashidhar Reddy <
> > shashidharreddy001@gmail.com> napsal:
> >
> >> Pavel,
> >>
> >> Below is the back trace result
> >>
> >> libffi6-dbg libgcc1-dbg libkrb5-dbg libstdc++6-8-dbg libxml2-dbg
> >> postgresql-13-dbgsym postgresql-13-pldeb
> >> ugger-dbgsym zlib1g-dbg
> >>
> >
> > I am sorry, I don't anything
> >
> >
> >
> >>
> >> On Mon, Dec 5, 2022 at 11:28 AM Pavel Stehule <pavel.stehule@gmail.com>
> >> wrote:
> >>
> >>> Hi
> >>>
> >>>
> >>> po 5. 12. 2022 v 6:49 odesílatel shashidhar Reddy <
> >>> shashidharreddy001@gmail.com> napsal:
> >>>
> >>>> Pavel,
> >>>>
> >>>> Where can I get list-dbgsym-packages.sh script?
> >>>>
> >>>
> >>>
> >>> https://manpages.debian.org/testing/debian-goodies/find-dbgsym-packages.1.en.html
> >>>
> >>> https://wiki.ubuntu.com/DebuggingProgramCrash
> >>>
> >>> please, don't use top-post style in this mailing list
> >>> https://en.wikipedia.org/wiki/Posting_style
> >>>
> >>> Regards
> >>>
> >>> Pavel
> >>>
> >>>
> >>>
> >>>> On Wed, Nov 30, 2022 at 10:04 AM Pavel Stehule <pavel.stehule@gmail.com>
> >>>> wrote:
> >>>>
> >>>>>
> >>>>>
> >>>>> st 30. 11. 2022 v 5:28 odesílatel Pavel Stehule <
> >>>>> pavel.stehule@gmail.com> napsal:
> >>>>>
> >>>>>>
> >>>>>>
> >>>>>> st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
> >>>>>> shashidharreddy001@gmail.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.stehule@gmail.com> wrote:
> >>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
> >>>>>>>> shashidharreddy001@gmail.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@gmail.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.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
> >>>>>>>>>>
> >>>>>>>>>
> >>>>
> >>>> --
> >>>> Shashidhar
> >>>>
> >>>
> >>
> >> --
> >> Shashidhar
> >>
> >
--
GPG 40BE 5B0E C98E 1713 AFA6 5BC0 3BEA AC80 7D4F C89B
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 04:34 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 05:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 05:57 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 07:41 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 08:05 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 10:24 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
@ 2022-12-05 12:15 ` Pavel Stehule <pavel.stehule@gmail.com>
1 sibling, 0 replies; 20+ messages in thread
From: Pavel Stehule @ 2022-12-05 12:15 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
po 5. 12. 2022 v 11:24 odesílatel shashidhar Reddy <
shashidharreddy001@gmail.com> napsal:
> Is there any way to get the older version 1.1 of plpgsql_check to install
> it?
>
you can compile it from source code
https://github.com/okbob/plpgsql_check
there are complete history
Regards
Pavel
>
> On Mon, 5 Dec, 2022, 1:36 pm Pavel Stehule, <pavel.stehule@gmail.com>
> wrote:
>
>>
>>
>> po 5. 12. 2022 v 8:42 odesílatel shashidhar Reddy <
>> shashidharreddy001@gmail.com> napsal:
>>
>>> Pavel,
>>>
>>> Below is the back trace result
>>>
>>> libffi6-dbg libgcc1-dbg libkrb5-dbg libstdc++6-8-dbg libxml2-dbg
>>> postgresql-13-dbgsym postgresql-13-pldeb
>>> ugger-dbgsym zlib1g-dbg
>>>
>>
>> I am sorry, I don't anything
>>
>>
>>
>>>
>>> On Mon, Dec 5, 2022 at 11:28 AM Pavel Stehule <pavel.stehule@gmail.com>
>>> wrote:
>>>
>>>> Hi
>>>>
>>>>
>>>> po 5. 12. 2022 v 6:49 odesílatel shashidhar Reddy <
>>>> shashidharreddy001@gmail.com> napsal:
>>>>
>>>>> Pavel,
>>>>>
>>>>> Where can I get list-dbgsym-packages.sh script?
>>>>>
>>>>
>>>>
>>>> https://manpages.debian.org/testing/debian-goodies/find-dbgsym-packages.1.en.html
>>>>
>>>> https://wiki.ubuntu.com/DebuggingProgramCrash
>>>>
>>>> please, don't use top-post style in this mailing list
>>>> https://en.wikipedia.org/wiki/Posting_style
>>>>
>>>> Regards
>>>>
>>>> Pavel
>>>>
>>>>
>>>>
>>>>> On Wed, Nov 30, 2022 at 10:04 AM Pavel Stehule <
>>>>> pavel.stehule@gmail.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> st 30. 11. 2022 v 5:28 odesílatel Pavel Stehule <
>>>>>> pavel.stehule@gmail.com> napsal:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> st 30. 11. 2022 v 1:38 odesílatel shashidhar Reddy <
>>>>>>> shashidharreddy001@gmail.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.stehule@gmail.com> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>>>>>>>>> shashidharreddy001@gmail.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@gmail.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.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
>>>>>>>>>>>
>>>>>>>>>>
>>>>>
>>>>> --
>>>>> Shashidhar
>>>>>
>>>>
>>>
>>> --
>>> Shashidhar
>>>
>>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-12-05 12:21 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 14:22 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
1 sibling, 1 reply; 20+ messages in thread
From: Pavel Stehule @ 2022-12-05 12:21 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
út 29. 11. 2022 v 17:28 odesílatel Pavel Stehule <pavel.stehule@gmail.com>
napsal:
>
>
> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
> shashidharreddy001@gmail.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
>
after checking source code, I was partially wrong. plpgsql_check doesn't
support update scripts. So if there are not same versions of plpgsql_check,
you need to reinstall plpgsql_check always
Regards
Pavel
>
> 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@gmail.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.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
>>>
>>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 12:21 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-12-05 14:22 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 16:07 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: shashidhar Reddy @ 2022-12-05 14:22 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-general
Hello Pavel,
I have re installed it after upgrade as update option was not working.
I could see the error in syslogs as error 4 in plpgsql_check.so and the
databases are restarting.
On Mon, 5 Dec, 2022, 5:51 pm Pavel Stehule, <pavel.stehule@gmail.com> wrote:
>
>
> út 29. 11. 2022 v 17:28 odesílatel Pavel Stehule <pavel.stehule@gmail.com>
> napsal:
>
>>
>>
>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>> shashidharreddy001@gmail.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
>>
>
> after checking source code, I was partially wrong. plpgsql_check doesn't
> support update scripts. So if there are not same versions of plpgsql_check,
> you need to reinstall plpgsql_check always
>
> Regards
>
> Pavel
>
>
>>
>> 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@gmail.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.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
>>>>
>>>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 12:21 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 14:22 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
@ 2022-12-05 16:07 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-06 10:47 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Stehule @ 2022-12-05 16:07 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
Hi
po 5. 12. 2022 v 15:22 odesílatel shashidhar Reddy <
shashidharreddy001@gmail.com> napsal:
> Hello Pavel,
>
> I have re installed it after upgrade as update option was not working.
>
> I could see the error in syslogs as error 4 in plpgsql_check.so and the
> databases are restarting.
>
1. please, don't send top post messages
2. There can be bugs in plpgsql_check, but without more detailed
information I am not able to fix it. Your example is working fine on my
computer.
can you run this function
CREATE OR REPLACE FUNCTION po_check(
)
RETURNS void
LANGUAGE 'plpgsql'
COST 100
VOLATILE SECURITY DEFINER PARALLEL UNSAFE
AS $BODY$
DECLARE r record;
BEGIN
FOR r IN SELECT p.oid, n.nspname, p.proname
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');
LOOP
RAISE NOTICE '>>% %<<', r.oid, r.nspname || '.' || r.proname;
PERFORM plpgsql_check_function(r.oid);
RAISE NOTICE 'ok';
END LOOP;
END;
$BODY$;
What is an output?
>
> On Mon, 5 Dec, 2022, 5:51 pm Pavel Stehule, <pavel.stehule@gmail.com>
> wrote:
>
>>
>>
>> út 29. 11. 2022 v 17:28 odesílatel Pavel Stehule <pavel.stehule@gmail.com>
>> napsal:
>>
>>>
>>>
>>> út 29. 11. 2022 v 16:37 odesílatel shashidhar Reddy <
>>> shashidharreddy001@gmail.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
>>>
>>
>> after checking source code, I was partially wrong. plpgsql_check doesn't
>> support update scripts. So if there are not same versions of plpgsql_check,
>> you need to reinstall plpgsql_check always
>>
>> Regards
>>
>> Pavel
>>
>>
>>>
>>> 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@gmail.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.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
>>>>>
>>>>
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 12:21 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 14:22 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 16:07 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-12-06 10:47 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-06 13:52 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
0 siblings, 1 reply; 20+ messages in thread
From: Pavel Stehule @ 2022-12-06 10:47 UTC (permalink / raw)
To: shashidhar Reddy <shashidharreddy001@gmail.com>; +Cc: pgsql-general
Hi
for record - the problem was probably in using plpgsql_check together with
PL debugger (plugin_debugger). Both extensions use the PLpgSQL DBG API, but
this API is not designed to be used by more extensions. plpgsql_check has
implemented some workaround, but it should be loaded last if this
workaround should work. Older versions of plpgsq_check (without profiler)
didn't use DBG API.
https://github.com/okbob/plpgsql_check#using-with-plugin_debugger
Regards
Pavel
^ permalink raw reply [nested|flat] 20+ messages in thread
* Re: plpgsql_check_function issue after upgrade
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 12:21 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 14:22 ` Re: plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 16:07 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
2022-12-06 10:47 ` Re: plpgsql_check_function issue after upgrade Pavel Stehule <pavel.stehule@gmail.com>
@ 2022-12-06 13:52 ` shashidhar Reddy <shashidharreddy001@gmail.com>
0 siblings, 0 replies; 20+ messages in thread
From: shashidhar Reddy @ 2022-12-06 13:52 UTC (permalink / raw)
To: Pavel Stehule <pavel.stehule@gmail.com>; +Cc: pgsql-general
On Tue, 6 Dec, 2022, 4:17 pm Pavel Stehule, <pavel.stehule@gmail.com> wrote:
> Hi
>
> for record - the problem was probably in using plpgsql_check together with
> PL debugger (plugin_debugger). Both extensions use the PLpgSQL DBG API, but
> this API is not designed to be used by more extensions. plpgsql_check has
> implemented some workaround, but it should be loaded last if this
> workaround should work. Older versions of plpgsq_check (without profiler)
> didn't use DBG API.
>
> https://github.com/okbob/plpgsql_check#using-with-plugin_debugger
>
I am loading the plpgsql_chect last after loading other extensions.
Looks like it is working for now, but need more time to check on it.
>
> Regards
>
> Pavel
>
^ permalink raw reply [nested|flat] 20+ messages in thread
end of thread, other threads:[~2022-12-06 13:52 UTC | newest]
Thread overview: 20+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29 12:48 plpgsql_check_function issue after upgrade shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 13:12 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-11-29 13:49 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 15:37 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-29 16:28 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 00:38 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-11-30 04:28 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-11-30 04:34 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 05:49 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 05:57 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 07:41 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 08:05 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 10:24 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 10:30 ` Karsten Hilbert <Karsten.Hilbert@gmx.net>
2022-12-05 12:15 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 12:21 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-05 14:22 ` shashidhar Reddy <shashidharreddy001@gmail.com>
2022-12-05 16:07 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-06 10:47 ` Pavel Stehule <pavel.stehule@gmail.com>
2022-12-06 13:52 ` shashidhar Reddy <shashidharreddy001@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox