Re: Crash during backend start when low on memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Mats Kindahl <mats(at)timescale(dot)com>, daniel(at)yesql(dot)se, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Crash during backend start when low on memory
Date: 2023-01-13 15:01:24
Message-ID: 1676515.1673622084@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Lakshmi Narayanan Sreethar 2023-01-13 15:23:49 DROP DATABASE deadlocks with logical replication worker in PG 15.1
Previous Message Alex Richman 2023-01-13 12:15:00 Re: Logical Replica ReorderBuffer Size Accounting Issues