Re: Batch update of indexes on data loading

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: 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 06:37:48
Message-ID: 23260.1204267068@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> Can we do REINDEX
>>> holding only shared lock on the index?
>>
>> 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.

> Hmm... Is it ok if the index will *not* instantaneously disappear?

It's not impossible but I really question whether it'd be worth the
complexity. There was something very closely related just yesterday
about whether DROP INDEX has to take exclusive lock ...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-02-29 10:02:12 Re: "could not open relation 1663/16384/16584: No such file or directory" in a specific combination of transactions with temp tables
Previous Message ITAGAKI Takahiro 2008-02-29 06:19:07 Re: Batch update of indexes on data loading