"Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu> writes:
> Maybe the take a copied list is safer. I got a little afraid of doing
> seqscan hash while doing HASH_ENTER at the same time. Do we have this kind
> of hash usage somewhere?
Sure, it's perfectly safe. It's unspecified whether the scan will visit
such entries or not (because it might or might not already have passed
their hash bucket), but per above discussion we don't really care.
regards, tom lane