Re: disabling an index without deleting it?

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Markus Bertheau" <mbertheau(dot)pg(at)googlemail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "Peter Koczan" <pjkoczan(at)gmail(dot)com>, "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>, "pgsql-performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: disabling an index without deleting it?
Date: 2008-02-27 20:50:10
Message-ID: 47C578A1.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

>>> On Tue, Feb 26, 2008 at 10:48 PM, in message <13604(dot)1204087729(at)sss(dot)pgh(dot)pa(dot)us>,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Er, later than what? Once the DROP is pending, other transactions can
> hardly safely use the index for lookups, and what should they do about
> insertions?

Out of curiosity, couldn't any transaction using a snapshot prior to
the commit of the DROP continue to use it (just like an uncommited
DELETE of a row)? The transaction doing the DROP wouldn't maintain
it for modifications, which is fine whether it is committed or
rolled back. There would just be the matter of "vacuuming" the
index out of physical existence once all transactions which could
see it are gone.

That's probably naive, but I'm curious what I'm missing.

-Kevin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2008-02-27 23:00:17 Re: disabling an index without deleting it?
Previous Message Tom Lane 2008-02-27 20:36:04 Re: PG planning randomly ?