"Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> writes:
> Yeah, you are right. I scratched elog/ereport(FATAL/PANIC), only found this
> one might be a suspect:
> In _hash_expandtable():
> if (!_hash_try_getlock(rel, start_nblkno, HASH_EXCLUSIVE))
> elog(PANIC, "could not get lock on supposedly new bucket");
> Or maybe elog(PANIC) is a false alarm here?
[ eyes code... ] I think the reason it wants to PANIC is because it's
already hacked up the hash metapage in shared buffers, and it needs
to prevent that update from getting written out. A CRIT_SECTION
would probably be a better answer --- thanks for spotting that.
regards, tom lane