Re: How to prevent vacuum and reindex from deadlocking.

Поиск
Список
Период
Сортировка
От Robert Creager
Тема Re: How to prevent vacuum and reindex from deadlocking.
Дата
Msg-id 20030810145640.36e368b8.Robert_Creager@LogicalChaos.org
обсуждение исходный текст
Ответ на How to prevent vacuum and reindex from deadlocking.  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Ответы Re: How to prevent vacuum and reindex from deadlocking.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Sun, 10 Aug 2003 14:50:10 -0600
Robert Creager <Robert_Creager@LogicalChaos.org> said something like:

>
> I'm running 7.4Beta1 with pg_autovacuum.  In one of my operations
> which is executed frequently, a REINDEX is done after a COPY.  Well,
> VACUUM's are being executed by pg_autovacuum, and my app is loosing
> the deadlock.
>
> Is there a way I can prevent this from happening?  I can obviously
> acquire a LOCK before doing the REINDEX (which one?), but it looks
> like this should be happening anyway by both the VACUUM and REINDEX
> statements.
>

Opps, if it helps, the log of the deadlock:

Aug 10 14:19:36 thunder postgres[18735]: [2-1] ERROR:  deadlock detected

Aug 10 14:19:36 thunder postgres[18735]: [2-2] DETAIL:  Proc 18735 waits
for AccessExclusiveLock on relation 18028 of database 17140; blocked by
proc 18815.

Aug 10 14:19:36 thunder postgres[18735]: [2-3] Proc 18815 waits for
AccessExclusiveLock on relation 18101 of database 17140; blocked by proc
18735.

--
 14:55:41 up 9 days,  7:41,  4 users,  load average: 1.56, 1.27, 1.08

Вложения

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

Предыдущее
От: Robert Creager
Дата:
Сообщение: 7.4Beta1 "failed to create socket: Address family not supported by protocol"
Следующее
От: Raymond
Дата:
Сообщение: Concatenating String Literals in pgsql