Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
>> I'd say you shouldn't release it at all.
> As far as I see I'm not releasing it.
Oh, I hadn't looked closely at reindex_index. Hmm... okay, you are
holding the lock acquired there. But you're still acquiring it way too
late for my taste. All of the setup work in reindex_relation seems to
be done without any lock.
regards, tom lane