Re: Batch update of indexes on data loading

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Markus Bertheau" <mbertheau(dot)pg(at)googlemail(dot)com>
Cc: "ITAGAKI Takahiro" <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Batch update of indexes on data loading
Date: 2008-02-29 05:05:45
Message-ID: 22245.1204261545@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Markus Bertheau" <mbertheau(dot)pg(at)googlemail(dot)com> writes:
> 2008/2/29, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Mielke 2008-02-29 05:24:59 Re: UUID data format 4x-4x-4x-4x-4x-4x-4x-4x
Previous Message Markus Bertheau 2008-02-29 04:40:41 Re: Batch update of indexes on data loading