pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Davis <pgsql@j-davis.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Joshua D. Drake <jd@commandprompt.com>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: Peter Koczan <pjkoczan@gmail.com>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: disabling an index without deleting it?
Date: Wed, 27 Feb 2008 11:16:58 -0800
Message-ID: <1204139818.16886.29.camel@dogma.ljc.laika.com> (raw)
In-Reply-To: <9050.1204064560@sss.pgh.pa.us>
References: <4544e0330802261246t574167fdpc47629d1bbe64fed@mail.gmail.com>
	<dcc563d10802261257h6abfbc92x62a7569b8610ecc4@mail.gmail.com>
	<20080226130339.64bd4ec3@commandprompt.com>
	<9050.1204064560@sss.pgh.pa.us>

On Tue, 2008-02-26 at 17:22 -0500, Tom Lane wrote:
> "Joshua D. Drake" <jd@commandprompt.com> writes:
> > "Scott Marlowe" <scott.marlowe@gmail.com> wrote:
> >> begin;
> >> drop index abc_dx;
> >> select ....
> >> rollback;
> >> 
> >> and viola, your index is still there.  note that there are likely some
> >> locking issues with this, so be careful with it in production.  But on
> >> a test box it's a very easy way to test various indexes.
> 
> > Wouldn't you also bloat the index?
> 
> No, what makes you think that?  The index won't change at all in the
> above example.  The major problem is, as Scott says, that DROP INDEX
> takes exclusive lock on the table so any other sessions will be locked
> out of it for the duration of your test query.

It may cause catalog bloat though, right?

Regards,
	Jeff Davis




view thread (18+ messages)  latest in thread

Message-ID: <1204139818.16886.29.camel@dogma.ljc.laika.com>
Permalink:  ../1204139818.16886.29.camel@dogma.ljc.laika.com/
Also on:    postgresql.org/message-id/1204139818.16886.29.camel@dogma.ljc.laika.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: pgsql@j-davis.com, tgl@sss.pgh.pa.us, jd@commandprompt.com, scott.marlowe@gmail.com, pjkoczan@gmail.com
  Subject: Re: disabling an index without deleting it?
  In-Reply-To: <1204139818.16886.29.camel@dogma.ljc.laika.com>
  References: <4544e0330802261246t574167fdpc47629d1bbe64fed@mail.gmail.com> <dcc563d10802261257h6abfbc92x62a7569b8610ecc4@mail.gmail.com> <20080226130339.64bd4ec3@commandprompt.com> <9050.1204064560@sss.pgh.pa.us> <1204139818.16886.29.camel@dogma.ljc.laika.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox