Re: Safe memory allocation functions

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Safe memory allocation functions
Date: 2015-01-13 23:38:43
Message-ID: CAB7nPqTXcd=B9V4dMUySHinef6+qGaLk5sp3onzmL+WQNHF=YQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:
> [blah]
> (This is another reason for "_safe" not being the mot juste :-()
My wording was definitely incorrect but I sure you got it: I should
have said "safe on error". noerror or error_safe would are definitely
more correct.

> In that light, I'm not really convinced that there's a safe use-case
> for a behavior like this. I certainly wouldn't risk asking for a couple
> of gigabytes on the theory that I could just ask for less if it fails.
That's as well a matter of documentation. We could add a couple of
lines in for example xfunc.sgml to describe the limitations of such
APIs.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2015-01-13 23:39:09 Re: hung backends stuck in spinlock heavy endless loop
Previous Message Andres Freund 2015-01-13 23:21:31 Re: hung backends stuck in spinlock heavy endless loop