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 674982B4-2824-433D-AFC4-CCBF410D9424@yandex-team.ru
Whole thread
In response to Re: BUG #19382: Server crash at __nss_database_lookup  (surya poondla <suryapoondla4@gmail.com>)
List pgsql-bugs

> On 17 Apr 2026, at 04:20, surya poondla <suryapoondla4@gmail.com> wrote:
>
> I also added a fast-path optimization in snapshot_record_composite_types() to avoid repeated type tree walks when a
recordis assigned in a loop — it skips the snapshot if the outermost type's tupDesc_identifier hasn't changed since the
lastsnapshot. 

Cool, but ISTM that it won’t work for domains.

if (rec->nCompTypes > 0 && rec->compTypeOids[0] == rec->rectypeid)

compTypeOids is composite, rectypeid is domain oid.
Can we make this work for domains too?

> Added both new test cases (Cases 5 and 6) to the regression. All 248 core regression tests and all 13 PL/pgSQL tests
pass.

I hope it’s the last:

-- Case 7: composite variable used in RAISE NOTICE (exec_eval_datum path).
create type bug19382_foo5 as (a int, b int);
create function bug19382_test_eval_datum() returns void as $$
declare r bug19382_foo5;
begin
r.b := power(2, 30)::int4;
alter type bug19382_foo5 alter attribute b type text;
raise notice 'r = %', r; -- exec_eval_datum called here, no check
end;
$$ language plpgsql;
select bug19382_test_eval_datum();
drop function bug19382_test_eval_datum();
drop type bug19382_foo5 cascade;


Best regards, Andrey Borodin.


pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #19457: RE: pgp_sym_encrypt silently accepts non-FIPS ciphers (bf, cast5, 3des) when OpenSSL is in FIPS mod
Next
From: PG Bug reporting form
Date:
Subject: BUG #19458: OOM killer in jsonb_path_exists_opr (@?) with malformed JSONPath containing non-existent variables