X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 049929FB295 for ; Tue, 15 Aug 2006 18:32:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 96951-07 for ; Tue, 15 Aug 2006 21:32:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 900CA9FB274 for ; Tue, 15 Aug 2006 18:32:06 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id CEDBF5644D; Tue, 15 Aug 2006 16:32:04 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 15 Aug 2006 16:32:04 -0500 Date: Tue, 15 Aug 2006 16:32:03 -0500 From: "Jim C. Nasby" To: Sriram Dandapani Cc: pgsql-admin@postgresql.org Subject: Re: dropping partitioned table waits forever Message-ID: <20060815213203.GN21363@pervasive.com> References: <6992E470F12A444BB787B5C937B9D4DF0574F731@ca-mail1.cis.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF0574F731@ca-mail1.cis.local> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060815:sdandapani@counterpane.com::LGy/DpIdzqPXLOVH:00000000000 0000000000000000000000002rgE X-Hashcash: 1:20:060815:pgsql-admin@postgresql.org::N4uC/3iwXvhg1VGb:00000000000 0000000000000000000000005mGR X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200608/175 X-Sequence-Number: 22718 On Mon, Aug 14, 2006 at 03:32:10PM -0700, Sriram Dandapani wrote: > Hi > > > > I have a table partitioned on a daily basis. Data is constantly inserted > in this table. When I attempt to drop a partition that is not used(i.e > previous day's), the drop table waits for a loooong time.This is > probably due to the fact that the old partitioned table is being > referenced in a query plan(the insert into the parent table uses > triggers). > > How can I prevent the locking out of the drop table? I tried truncate > table but it is worse. It locks out the inserts in the parent table and > then it waits.(hence causing a deadlock) What about dropping/changing the trigger? -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461