Re: BUG #19382: Server crash at __nss_database_lookup - Mailing list pgsql-bugs

From Andrey Borodin
Subject Re: BUG #19382: Server crash at __nss_database_lookup
Date
Msg-id D279BE7A-0E13-450A-8639-25937E94611D@yandex-team.ru
Whole thread
In response to Re: BUG #19382: Server crash at __nss_database_lookup  (surya poondla <suryapoondla4@gmail.com>)
Responses Re: BUG #19382: Server crash at __nss_database_lookup
List pgsql-bugs
Hi!

Thanks for working on this!

> On 20 Mar 2026, at 23:16, surya poondla <suryapoondla4@gmail.com> wrote:
>
> I'll post an updated patch with this improvement.

After your patch Postgres still crashes on this test:

CREATE TYPE foo AS (a INT, b INT);
BEGIN;
DECLARE c CURSOR FOR SELECT (i, power(2, 30))::foo FROM generate_series(1,10) i;
FETCH c;
ALTER TYPE foo ALTER ATTRIBUTE b TYPE TEXT;
FETCH c;
COMMIT;

This test case was proposed in this thread, but I suggest treating this as a separate bug needing separate fix.


In my opinion in both cases (PL/pgSQL + CURSOR) we should error out instead of trying to remediate type changes.


Best regards, Andrey Borodin.


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Surprising behavior with pushing predicates down into a view
Next
From: PG Bug reporting form
Date:
Subject: BUG #19449: Massive performance degradation for complex query on Postgres 16+ (few seconds -> multiple hours)