Re: Batch update of indexes on data loading - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Batch update of indexes on data loading
Date
Msg-id 22245.1204261545@sss.pgh.pa.us
Whole thread Raw
In response to Re: Batch update of indexes on data loading  ("Markus Bertheau" <mbertheau.pg@googlemail.com>)
List pgsql-hackers
"Markus Bertheau" <mbertheau.pg@googlemail.com> writes:
> 2008/2/29, Tom Lane <tgl@sss.pgh.pa.us>:
>> No.  When you commit the reindex, the old copy of the index will
>> instantaneously disappear; it will not do for someone to be actively
>> scanning that copy.

> Can a shared lock be taken at first, and when the new index is ready,
> in order to delete the old index, elevate that lock to an exclusive
> one?

You could try, but lock upgrades are generally a recipe for increasing
your risk of deadlock failure.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Markus Bertheau"
Date:
Subject: Re: Batch update of indexes on data loading
Next
From: Mark Mielke
Date:
Subject: Re: UUID data format 4x-4x-4x-4x-4x-4x-4x-4x