"Luis Alberto Amigo Navarro" <lamigo(at)atc(dot)unican(dot)es> writes:
> could you please tell me where to find info on when and why is semop used,
It's used when we need to block the current process (or to unblock
another process that had been waiting). Look for calls to
IpcSemaphoreLock and IpcSemaphoreUnlock.
A large number of semops may mean that you have excessive contention on
some lockable resource, but I don't have enough info to guess what resource.
Have you tried doing profiling of the backend?
regards, tom lane