pgsql: Avoid low-probability crash on out-of-memory.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid low-probability crash on out-of-memory.
Date: 2024-12-05 17:54:48
Message-ID: E1tJG3r-001GiN-Pd@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid low-probability crash on out-of-memory.

check_restrict_nonsystem_relation_kind() correctly uses guc_malloc()
in v16 and later. But in older branches it must use malloc()
directly, and it forgot to check for failure return.
Faulty backpatching of 66e94448a.

Karina Litskevich

Discussion: https://postgr.es/m/CACiT8iZ=atkguKVbpN4HmJFMb4+T9yEowF5JuPZG8W+kkZ9L6w@mail.gmail.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d24eb0e91f3f7fc54ed4e56d93b26e2f8d52c1ce

Modified Files
--------------
src/backend/tcop/postgres.c | 5 +++++
1 file changed, 5 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2024-12-06 00:02:44 pgsql: Fix printf format string warning on MinGW.
Previous Message Peter Eisentraut 2024-12-05 06:39:08 pgsql: Remove pg_regex_collation