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

From Dennis Gearon
Subject Re: How to prevent vacuum and reindex from deadlocking.
Date
Msg-id 3F390437.5050002@cvc.net
Whole thread Raw
In response to Re: How to prevent vacuum and reindex from deadlocking.  (Robert Creager <Robert_Creager@LogicalChaos.org>)
Responses Re: How to prevent vacuum and reindex from deadlocking.
List pgsql-general
Postgres itself doesn't support nested transactions.

Robert Creager wrote:

> On Mon, 11 Aug 2003 11:05:57 -0400
> Tom Lane <tgl@sss.pgh.pa.us> said something like:
>
>
>>If you really want to rebuild only the one index, I think this will work:
>>
>>begin;
>>lock table tab;
>>reindex index ndx;
>>commit;
>
>
> Figures.  It appears that DBD::Pg doesn't supported nested transactions (I was
> already in a transaction).
>
> DBD::Pg::db begin_work failed: Already in a transaction at
> /tass/bin/importSList.pl line 445.
>
> Unfortunatly, it does take longer overall because of the second index on the
> table, but it always works ;-)  'Nother duh moment, delete the second index,
> and then it works just fine speed wise.  Guess I need to re-examine my index
> usage...
>
> Thanks,
> Rob
>


pgsql-general by date:

Previous
From: Teodor Sigaev
Date:
Subject: Re: Tsearch limitations
Next
From: Dennis Gearon
Date:
Subject: Re: types of constraint deferment