I wrote:
> Also, we have a generic issue that making fresh entries in a hashtable
> might result in a concurrent hash_seq_search scan visiting existing
> entries more than once; that's definitely not something any of the
> existing callers are thinking about.
> I'm too tired to think about fixes right now, but we've definitely
> found a hotbed of actual and potential bugs.
I've committed a fix for this; it'll be in the next set of releases.
regards, tom lane