Re: Table locking problems?

От: Tom Lane
Тема: Re: Table locking problems?
Дата: ,
Msg-id: 18199.1123614486@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: Re: Table locking problems?  ("Joshua D. Drake")
Ответы: Re: 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, )

"Joshua D. Drake" <> writes:
> My experience is that when this type of thing happens it is typically
> specific queries that cause the problem. If you turn on statement
> logging you can get the exact queries and debug from there.

> Here are some things to look for:

> Is it a large table (and thus large indexes) that it is updating?
> Is the query using indexes?
> Is the query modifying ALOT of rows?

Another thing to look at is foreign keys.  Dan could be running into
problems with an update on one side of an FK being blocked by locks
on the associated rows on the other side.

            regards, tom lane


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

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