From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Rework handling of OOM when allocating record buffer in XLOG rea
Date: Fri, 03 Apr 2015 09:30:02 +0000
Message-ID: <E1YdxvO-0002eX-7N@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Rework handling of OOM when allocating record buffer in XLOG reader.
Commit 2c03216 changed allocate_recordbuf() so that it uses a palloc to
allocate the read buffer and fails immediately when an out-of-memory error
shows up, even though its callers still expect that NULL is returned in that
case. This bug is fixed making allocate_recordbuf() use a palloc_extended
with MCXT_ALLOC_NO_OOM flag and return NULL in OOM case.
Michael Paquier
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/9b8d4782ba0f75eb0f029c743bb85166999d9fa5
Modified Files
--------------
src/backend/access/transam/xlogreader.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: fujii@postgresql.org
Subject: Re: pgsql: Rework handling of OOM when allocating record buffer in XLOG rea
In-Reply-To: <E1YdxvO-0002eX-7N@gemulon.postgresql.org>
References: <E1YdxvO-0002eX-7N@gemulon.postgresql.org>
* 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