Re: Blocking excessively in FOR UPDATE

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Blocking excessively in FOR UPDATE
Дата
Msg-id
6734.1320345936@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Re: Blocking excessively in FOR UPDATE Tom Lane <tgl@sss.pgh.pa.us>
Re: Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Re: Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Re: Blocking excessively in FOR UPDATE Tom Lane <tgl@sss.pgh.pa.us>
Re: Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Re: Blocking excessively in FOR UPDATE "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Re: Blocking excessively in FOR UPDATE "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Re: Blocking excessively in FOR UPDATE Shaun Thomas <sthomas@peak6.com>
Re: Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Re: Blocking excessively in FOR UPDATE Shaun Thomas <sthomas@peak6.com>
Re: Blocking excessively in FOR UPDATE Robert Haas <robertmhaas@gmail.com>
Re: Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Re: Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Re: Blocking excessively in FOR UPDATE Robert Haas <robertmhaas@gmail.com>
Re: Blocking excessively in FOR UPDATE Claudio Freire <klaussfreire@gmail.com>
Claudio Freire  writes:
> The same query, without FOR UPDATE, takes just 68 milliseconds.
> With the FOR UPDATE, it takes like half a minute or more to finish.

> Now, I understand the for update part may be blocking on some other
> transaction, and it's probably the case.

Yeah, that's what I'd guess.

> But I cannot figure out which transaction it would be. There *are*, in
> fact, connections in  state, which makes me think
> those would be the culprit. But for the life of me, I cannot make
> sense of the pg_locks view, which shows all locks as granted:

A block on a row would typically show up as one transaction waiting on
another's XID.  Did you capture this *while* the query was blocked?
Also, I'm suspicious that you may be using a view that filters out
the relevant lock types --- that's obviously not a raw display of
pg_locks.

			regards, tom lane
В списке pgsql-performance по дате отправления
От: Tom Lane
Дата:
От: Jay Levitt
Дата:
FAQ