Tom Lane wrote:
> Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
>
> ... We don't want to elog(ERROR) partway through that
> process. Especially not in the postmaster, where elog(ERROR) is
> tantamount to elog(FATAL). (But of course the postmaster shouldn't ever
> run out of memory anyway...)
>
> It's possible that this should all be rethought, but it would be a much
> more wide-ranging change than we've been discussing.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>
Here's a patch dealing with the unchecked mallocs and strdups in guc.c.
Rather than mixing in palloc and TopMemoryContext into the code (would
be rather messy given that most allocs actually falls into the category
of not always being permitted to do elog(ERROR/FATAL)), I added a couple
of simple static functions for guc_alloc, guc_realloc, and guc_strdup
that are used throughout the guc.c file.
Kind regards,
Thomas Hallgren