Re: Crash during backend start when low on memory - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Crash during backend start when low on memory
Date
Msg-id 1676515.1673622084@sss.pgh.pa.us
Whole thread Raw
In response to Re: Crash during backend start when low on memory  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Crash during backend start when low on memory  (Mats Kindahl <mats@timescale.com>)
List pgsql-bugs
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2023-Jan-13, Mats Kindahl wrote:
>> I have an improved patch based on raising an error when malloc fails.

> Hmm, but I'm not sure I like what you did to BackendStartup:

Yeah, the BackendStartup change is 100% wrong; it is replacing
perfectly good code that recovers correctly with bad code that
will take down the postmaster (not a backend child!) on OOM.

By and large I don't like anything about this patch.  You could
get the same results (i.e. elog(ERROR) on OOM) by replacing the
malloc calls with pallocs.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Alex Richman
Date:
Subject: Re: Logical Replica ReorderBuffer Size Accounting Issues
Next
From: Lakshmi Narayanan Sreethar
Date:
Subject: DROP DATABASE deadlocks with logical replication worker in PG 15.1