Re: How to prevent vacuum and reindex from deadlocking.

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: Robert Creager <Robert_Creager(at)LogicalChaos(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to prevent vacuum and reindex from deadlocking.
Date: 2003-08-12 15:13:59
Message-ID: 3F390437.5050002@cvc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Postgres itself doesn't support nested transactions.

Robert Creager wrote:

> On Mon, 11 Aug 2003 11:05:57 -0400
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Gearon 2003-08-12 15:15:05 Re: types of constraint deferment
Previous Message Stephan Szabo 2003-08-12 15:11:05 Re: Update of foreign key values