pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Mats Kindahl <mats@timescale.com>
Cc: daniel@yesql.se
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Crash during backend start when low on memory
Date: Fri, 13 Jan 2023 10:01:24 -0500
Message-ID: <1676515.1673622084@sss.pgh.pa.us> (raw)
In-Reply-To: <20230113115352.sbuv5egpjyoxn52i@alvherre.pgsql>
References: <20230113115352.sbuv5egpjyoxn52i@alvherre.pgsql>

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





view thread (21+ messages)  latest in thread

Message-ID: <1676515.1673622084@sss.pgh.pa.us>
Permalink:  ../1676515.1673622084@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1676515.1673622084@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, mats@timescale.com, daniel@yesql.se, pgsql-bugs@lists.postgresql.org
  Subject: Re: Crash during backend start when low on memory
  In-Reply-To: <1676515.1673622084@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox