> Hmm ... semops? What platform are you on, anyway, and which
> PG version?
> It sounds like you might be running with the fallback SysV-semaphore-
> based implementation of spinlocks, which is orders of magnitude more
access/heap/hio.c:RelationGetBufferForRelation() uses LockPage
(ie lmgr -> semops) to syncronize table extending. Probably we could
optimize this somehow, but allocation of new page in bufmgr is
horrible and that's why we have locks in hio.c from the beginning.
Vadim