pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrey Borodin <x4mmm@yandex-team.ru>
To: surya poondla <suryapoondla4@gmail.com>
Cc: songjinzhou <tsinghualucky912@foxmail.com>
Cc: dllggyx <dllggyx@outlook.com>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #19382: Server crash at __nss_database_lookup
Date: Thu, 2 Apr 2026 16:18:29 +0500
Message-ID: <D279BE7A-0E13-450A-8639-25937E94611D@yandex-team.ru> (raw)
In-Reply-To: <CAOVWO5oH37CETZuxxXw3dhCMOHPMA0xFoJBWTpfJ06OV7sGzTQ@mail.gmail.com>
References: <19382-4c2060ffee72759b@postgresql.org>
	<CAOVWO5rVBKsjG4YwO_PJQu2OBGp8qUdF1jineYY6Lm3zc6-KWQ@mail.gmail.com>
	<CAOVWO5rbwKgHWLYJMvKuvGxW9eFSk7LADk=ZxDEvwA1uTefvAg@mail.gmail.com>
	<CAOVWO5qN8UXdwMnDa+a7aVq=irGSfm2aeYvEc-uV6j4QHZiyrA@mail.gmail.com>
	<CAOVWO5py4zLPYsnGK1EEzHnC4feTSmbsEZn-BiDgY_=J1P6Wmw@mail.gmail.com>
	<CAOVWO5pbgCVx0zgTr1mxZug2hoGwxZOk+-Owvwg0jaQv9JE3Fw@mail.gmail.com>
	<CAOVWO5r19cctAFKbW24jfMKsD-pkyV21w+z7L3pCPxM1CArtjQ@mail.gmail.com>
	<CAOVWO5oSeBouPv0ueVByh+_6EgRCjWh0spSmnF6Cv-TF1twqKg@mail.gmail.com>
	<tencent_04DAF0C76A6A76A8C7B48212F2362C818A09@qq.com>
	<CAOVWO5oH37CETZuxxXw3dhCMOHPMA0xFoJBWTpfJ06OV7sGzTQ@mail.gmail.com>

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.




view thread (32+ messages)  latest in thread

Message-ID: <D279BE7A-0E13-450A-8639-25937E94611D@yandex-team.ru>
Permalink:  ../D279BE7A-0E13-450A-8639-25937E94611D@yandex-team.ru/
Also on:    postgresql.org/message-id/D279BE7A-0E13-450A-8639-25937E94611D@yandex-team.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: x4mmm@yandex-team.ru, suryapoondla4@gmail.com, tsinghualucky912@foxmail.com, dllggyx@outlook.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19382: Server crash at __nss_database_lookup
  In-Reply-To: <D279BE7A-0E13-450A-8639-25937E94611D@yandex-team.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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