Rural Hunter <ruralhunter(at)gmail(dot)com> writes:
>> Does that indicate something? seems it's waiting for some lock.
Yeah, that's what the stack trace suggests. Have you looked into pg_locks
and pg_stat_activity to see which lock it wants and what's holding said
lock?
regards, tom lane