Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id E61792E0052 for ; Wed, 27 Feb 2008 19:38:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 17296-07 for ; Wed, 27 Feb 2008 19:38:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 020832E0040 for ; Wed, 27 Feb 2008 19:38:29 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id m1RNbiYk012355; Wed, 27 Feb 2008 18:37:44 -0500 (EST) To: "Kevin Grittner" cc: "Joshua D. Drake" , "Peter Koczan" , "Scott Marlowe" , "Markus Bertheau" , "pgsql-performance" Subject: Re: disabling an index without deleting it? In-reply-to: <47C59B79.EE98.0025.0@wicourts.gov> References: <4544e0330802261246t574167fdpc47629d1bbe64fed@mail.gmail.com> <20080226130339.64bd4ec3@commandprompt.com> <9050.1204064560@sss.pgh.pa.us> <684362e10802261848j79686752k6dfbe032e985b131@mail.gmail.com><684362e10802261848j79686752k6dfbe032e985b131@mail.gmail.com> <13604.1204087729@sss.pgh.pa.us> <47C578A1.EE98.0025.0@wicourts.gov><47C578A1.EE98.0025.0@wicourts.gov> <10385.1204153217@sss.pgh.pa.us> <47C59B79.EE98.0025.0@wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Wed, 27 Feb 2008 17:18:50 -0600" Date: Wed, 27 Feb 2008 18:37:44 -0500 Message-ID: <12354.1204155464@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200802/388 X-Sequence-Number: 28930 "Kevin Grittner" 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