Re: hash_create(): check return code - Mailing list pgsql-patches

From Tom Lane
Subject Re: hash_create(): check return code
Date
Msg-id 3960.1098429205@sss.pgh.pa.us
Whole thread Raw
In response to Re: hash_create(): check return code  (Neil Conway <neilc@samurai.com>)
Responses Re: hash_create(): check return code  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> On Fri, 2004-10-22 at 16:13, Tom Lane wrote:
>> There are no places where hash_create is called before elog() is
>> functional.

> Well, it's invoked from the statistics collector, which avoids doing
> elog(ERROR) for some reason.

With all due respect to Jan, that coding seems 100% bogus.  elog(ERROR)
will work (it had better, because pgstat.c certainly calls routines that
might do it) and the insistence on using exit() rather than proc_exit()
is just plain wrong anyway.

Note that there is really no difference between elog(ERROR) and
elog(FATAL) in this context, since pgstat doesn't have an outer
sigsetjmp call.

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: hash_create(): check return code
Next
From: Neil Conway
Date:
Subject: Re: code cleanup in dynahash.c