Re: How to prevent vacuum and reindex from deadlocking. - Mailing list pgsql-general

From Robert Creager
Subject Re: How to prevent vacuum and reindex from deadlocking.
Date
Msg-id 20030810145640.36e368b8.Robert_Creager@LogicalChaos.org
Whole thread Raw
In response to How to prevent vacuum and reindex from deadlocking.  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Responses Re: How to prevent vacuum and reindex from deadlocking.  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

Attachment

pgsql-general by date:

Previous
From: Robert Creager
Date:
Subject: 7.4Beta1 "failed to create socket: Address family not supported by protocol"
Next
From: Raymond
Date:
Subject: Concatenating String Literals in pgsql