Re: The return value of allocate_recordbuf()

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: The return value of allocate_recordbuf()
Date: 2015-04-02 00:20:51
Message-ID: CAB7nPqTcTHhOdkxtjPf3OTFCHZqnAbG8Q1qLPQ5yO=txg1YyyQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 2, 2015 at 9:10 AM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> Where are we on this?
>

If we want to have allocate_recordbuf error out properly on frontend side,
we are going to need a equivalent of MemoryContextAllocExtended for
frontends in the shape of palloc_extended able to take control flags.
That's what the patch I sent previously proposes. And this is 9.5 material,
except if we accept that allocate_recordbuf() will fail all the time in
case of an OOM (the only code path where we don't need to mandatory fail
with OOM for this routine is used only with WAL_DEBUG in xlog.c). Now if we
push forward with this patch, and I think we should to maintain
compatibility with WAL_DEBUG with previous versions, we'll need to add as
well an ERROR when an OOM occurs after XLogReaderAllocate in logical.c, and
in pg_rewind's parsexlog.c.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Nasby 2015-04-02 00:24:05 Re: Relation extension scalability
Previous Message Bruce Momjian 2015-04-02 00:10:44 Re: The return value of allocate_recordbuf()