Re: TRUNCATE locking problem

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: TRUNCATE locking problem
Дата
Msg-id 18982.1121954917@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: TRUNCATE locking problem  (Joe Maldonado <jmaldonado@webehosting.biz>)
Ответы Re: TRUNCATE locking problem  (Joe Maldonado <jmaldonado@webehosting.biz>)
Список pgsql-general
Joe Maldonado <jmaldonado@webehosting.biz> writes:
> While researching this locking issue I got some of the logs and found
> that in one of the cases there was a SELECT running for a long time,
> about 2 hours.  This select statement does not usually take more than a
> few seconds though, it appeared that TRUNCATE was waiting on it to
> finish before continuing.

> The SELECT statement in question contains a sub SELECT in the FROM
> clause which in turn is joining with a view that contains the table
> which TRUNCATE is being executed against.

> Is it possible that the SELECT was issues just before the TRUNCATE
> statement was issues and the view in the sub SELECT was waiting on
> TRUNCATE's lock?

No.  That would be a deadlock and would be reported as such.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Wishlist?
Следующее
От: Joe Maldonado
Дата:
Сообщение: Re: TRUNCATE locking problem