Re: BUG #19382: Server crash at __nss_database_lookup

From: surya poondla <suryapoondla4(at)gmail(dot)com>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
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-09 04:24:06
Message-ID: CAOVWO5o9YOpCTgg6FfNepCoH_6pFSa7TJ3SEWfJAoBvNOb0OdQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Andrey,

Thank you for the comments.

> The server still crashes when only an inner type is altered:
>
> CREATE TYPE inner_t AS (x INT, y INT);
> CREATE TYPE outer_t AS (a INT, b inner_t);
>
> CREATE OR REPLACE FUNCTION test_nested() RETURNS record LANGUAGE plpgsql
> AS $$
> DECLARE r1 outer_t; r2 outer_t;
> BEGIN
> r1 := ROW(1, ROW(10, power(2,30)::int4)::inner_t)::outer_t;
> ALTER TYPE inner_t ALTER ATTRIBUTE y TYPE TEXT;
> r2 := r1;
> RETURN r2;
> END; $$;
>
> SELECT test_nested(); -- server crash
>
> Thank you for the nested composite testcase and the fix in cursor
code, the changes look good.. I fixed the PL/pgsql to fix the nested
components.

Here is the patch for the pl/pgsql fix

Regards,
Surya Poondla

Attachment Content-Type Size
0005-Fix-bug-19382-server-crash-when-ALTER-TYPE-is-used-m.patch application/octet-stream 14.2 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Fredrik Widlert 2026-04-09 15:27:19 BUG: PostgreSQL 19devel throws internal opfamily error for FK with reordered referenced columns
Previous Message Александр Курдаков 2026-04-08 23:19:38 Re: BUG #19452: heap-buffer-overflow in `pg_basebackup --format=tar --gzip`