Re: Safe memory allocation functions - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Safe memory allocation functions
Date
Msg-id CAB7nPqTXcd=B9V4dMUySHinef6+qGaLk5sp3onzmL+WQNHF=YQ@mail.gmail.com
Whole thread Raw
In response to Re: Safe memory allocation functions  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: hung backends stuck in spinlock heavy endless loop
Next
From: Merlin Moncure
Date:
Subject: Re: hung backends stuck in spinlock heavy endless loop