public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alvaro Herrera <[email protected]>
To: Thomas Hallgren <[email protected]>
Cc: [email protected]
Subject: Re: bug in GUC
Date: Thu, 24 Jun 2004 12:55:42 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Thu, Jun 24, 2004 at 04:45:31PM +0200, Thomas Hallgren wrote:
> Ok, so I'm a newbie. To my defence I'll say that I made an effort to follow
> the style previously used in guc.c. The unchecked mallocs I added were not
> the first ;-)
Apparently Peter thought it was a good idea *not* to use palloc and
friends, and documented it. The rationale seems to be "we have more
control over out-of-memory conditions", and if you look closely, the
out-of-memory is handled at a lower level than ERROR if it's not
processing interactively. For example, when reading the config file,
the ereport is DEBUG2.
I'm not sure exactly why this is a good idea. After all, if the systems
runs out of memory while starting up, what can be expected later? Not a
lot is going to work.
> So, what you are saying is that there's no need for the functions I
> suggested and that a palloc using the TopMemoryContext will guarantee
> correct behavior on "out of memory"?
IMO yes and yes.
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La felicidad no es maƱana. La felicidad es ahora"
view thread (10+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: bug in GUC
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox