Re: Slow DROP INDEX

From: "John Li" <john(dot)li(at)earthlink(dot)net>
To: "Rod Taylor" <pg(at)rbt(dot)ca>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Slow DROP INDEX
Date: 2004-02-16 19:08:49
Message-ID: EBECLIDIJCMMAPENHIFLIEFACEAA.john.li@earthlink.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Based on my experience, "drop index" is waiting for a chance to place the
lock. If all those queries are within the same connection, "drop index" has
to wait until that connection disconnected.

John Li

-----Original Message-----
From: pgsql-hackers-owner(at)postgresql(dot)org
[mailto:pgsql-hackers-owner(at)postgresql(dot)org]On Behalf Of Rod Taylor
Sent: Monday, February 16, 2004 10:56 AM
To: Tom Lane
Cc: PostgreSQL Development
Subject: Re: [HACKERS] Slow DROP INDEX

On Mon, 2004-02-16 at 13:03, Tom Lane wrote:
> Rod Taylor <pg(at)rbt(dot)ca> writes:
> > The real question is why does DROP INDEX take more than a couple of
> > seconds to complete? It is not held up by locked.
>
> AFAICS it shouldn't take any time to complete. I think you're mistaken
> and it is blocking on a lock (it will want exclusive lock on the table).
> Everyone else will then queue up behind it.

I not convinced it is waiting on a lock. The queries on that table are
very short (couple of milliseconds) -- but there are a ton of them. All
backends appear to be idle (pg_stat_activity with command shown) when we
start the drop and shortly after huge backups occur.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-02-16 19:23:42 Re: Proposed Query Planner TODO items
Previous Message Tom Lane 2004-02-16 19:05:04 Re: Slow DROP INDEX