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

Tom Lane <tgl@sss.pgh.pa.us>

Commit: d24eb0e91f3f7fc54ed4e56d93b26e2f8d52c1ce
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2024-12-05T17:54:41Z
Releases: 14.16
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

Files

PathChange+/−
src/backend/tcop/postgres.c modified +5 −0

Discussion