Re: hash_create(): check return code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: hash_create(): check return code
Date: 2004-10-22 07:13:25
Message-ID: 3960.1098429205@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway <neilc(at)samurai(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2004-10-22 12:42:06 Re: code cleanup in dynahash.c
Previous Message Neil Conway 2004-10-22 06:55:27 Re: hash_create(): check return code