Re: Table locking problems?

От: Michael Fuhr
Тема: Re: Table locking problems?
Дата: ,
Msg-id: 20050809185201.GA25325@winnie.fuhr.org
(см: обсуждение, исходный текст)
Ответ на: Table locking problems?  (Dan Harris)
Список: pgsql-performance

Скрыть дерево обсуждения

Table locking problems?  (Dan Harris, )
 Re: Table locking problems?  ("Joshua D. Drake", )
  Re: Table locking problems?  (Tom Lane, )
   Re: Table locking problems?  (Dan Harris, )
 Re: Table locking problems?  (Michael Fuhr, )
 Re: Table locking problems?  (Steve Poe, )
  Re: Table locking problems?  (Dan Harris, )
   Re: Table locking problems?  (John A Meinel, )
    Re: Table locking problems?  (Dan Harris, )
     Re: Table locking problems?  (John A Meinel, )

On Tue, Aug 09, 2005 at 12:04:11PM -0600, Dan Harris wrote:
> These changes have definitely improved performance, but I am now
> finding some trouble with UPDATE or DELETE queries "hanging" and
> never releasing their locks.  As this happens, other statements queue
> up behind it.

Have you examined pg_locks to see if the UPDATE or DELETE is blocked
because of a lock another session holds?

Are you using foreign keys?  When updating referencing rows, released
versions of PostgreSQL acquire a lock on the referenced row that can
hurt concurrency or cause deadlock (this will be improved in 8.1).

--
Michael Fuhr


В списке pgsql-performance по дате сообщения:

От: John A Meinel
Дата:
Сообщение: Re: Table locking problems?
От: Tobias Brox
Дата:
Сообщение: partial index regarded more expensive