Re: unsafe use of hash_search(... HASH_ENTER ...)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: unsafe use of hash_search(... HASH_ENTER ...)
Date: 2005-06-06 05:23:25
Message-ID: 17687.1118035405@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> writes:
> I am afraid the problem are not limited to hash_search(). Any code snippet
> are not proteced by critical section like this:

This is not an issue except if the system might actually try to recover;
which is not the case in the postmaster snippet you mention.
elog(ERROR) in the postmaster is fatal, and the use of FATAL rather than
ERROR in this bit of code is merely documentation.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2005-06-06 05:27:13 Re: lastval()
Previous Message Qingqing Zhou 2005-06-06 05:09:27 Re: unsafe use of hash_search(... HASH_ENTER ...)