Re: The return value of allocate_recordbuf()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: The return value of allocate_recordbuf()
Date: 2014-12-31 16:10:30
Message-ID: CA+Tgmoay_=oK6+jtbqv21uOsKPGmWtyh2cfRVmd+eVF0cbgYgw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 29, 2014 at 6:14 AM, Heikki Linnakangas
<hlinnakangas(at)vmware(dot)com> wrote:
> Hmm. There is no way to check beforehand if a palloc() will fail because of
> OOM. We could check for MaxAllocSize, though.

I think we need a version of palloc that returns NULL instead of
throwing an error. The error-throwing behavior is for the best in
almost every case, but I think the no-error version would find enough
users to be worthwhile.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2014-12-31 16:16:20 Re: Parallel Seq Scan
Previous Message Robert Haas 2014-12-31 16:07:38 Re: psql tab completion: fix COMMENT ON ... IS IS IS