Re: BUG #19382: Server crash at __nss_database_lookup

From: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
To: surya poondla <suryapoondla4(at)gmail(dot)com>
Cc: songjinzhou <tsinghualucky912(at)foxmail(dot)com>, dllggyx <dllggyx(at)outlook(dot)com>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #19382: Server crash at __nss_database_lookup
Date: 2026-04-02 11:18:29
Message-ID: D279BE7A-0E13-450A-8639-25937E94611D@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi!

Thanks for working on this!

> On 20 Mar 2026, at 23:16, surya poondla <suryapoondla4(at)gmail(dot)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.

In response to

Responses

Browse pgsql-bugs by date

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