Re: disabling an index without deleting it?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
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>, "Markus Bertheau" <mbertheau(dot)pg(at)googlemail(dot)com>, "pgsql-performance" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: disabling an index without deleting it?
Date: 2008-02-27 23:37:44
Message-ID: 12354.1204155464@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> If xact A is using a snapshot from before the commit of the index
> DROP, it shouldn't see anything done after the drop anyway. If
> it's using a snapshot from after the DROP, it won't see the index.
> xact B would only fail to update the index if it was using a
> snapshot after the drop, so I'm having trouble grasping the
> sequence of events where this is a problem. Could you outline
> the series of events where the problem occurs?

You're assuming that the query plan is as new as the snapshot is.
This isn't guaranteed, at least not without the locking that you
seek to eliminate.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Andrew Lazarus 2008-02-28 00:54:20 Re: when is a DELETE FK trigger planned?
Previous Message Tom Lane 2008-02-27 23:33:01 Re: disabling an index without deleting it?