X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D9C509FB3F2 for ; Thu, 31 Aug 2006 17:41:58 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 86802-02-5 for ; Thu, 31 Aug 2006 17:41:53 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from natasha.counterpane.com (natasha.hq.counterpane.com [208.162.171.162]) by postgresql.org (Postfix) with SMTP id 8F56F9FB3FA for ; Thu, 31 Aug 2006 17:39:34 -0300 (ADT) Received: from kraken.hq.counterpane.com ([172.16.2.55]) by natasha.counterpane.com; Thu, 31 Aug 2006 20:39:00 +0000 (UTC) Received: From bluefish.counterpane.com ([172.16.2.51]) by kraken.cis.local (WebShield SMTP v4.5 MR2); id 1157056739982; Thu, 31 Aug 2006 13:38:59 -0700 Received: from achilles.cis.local ([172.16.2.26]) by bluefish.counterpane.com (PGP Universal service); Thu, 31 Aug 2006 13:38:59 -0700 X-PGP-Universal: processed; by bluefish.counterpane.com on Thu, 31 Aug 2006 13:38:59 -0700 Received: From ca-mail1.cis.local ([172.16.2.54]) by achilles.cis.local (WebShield SMTP v4.5 MR2); id 1157056734680; Thu, 31 Aug 2006 13:38:54 -0700 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: Re: archive logs recovery Date: Thu, 31 Aug 2006 13:38:48 -0700 Message-ID: <6992E470F12A444BB787B5C937B9D4DF05ABC4CD@ca-mail1.cis.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] archive logs recovery Thread-Index: AcbNPUXSfliZ3IAOQL6nR5zxRIMLJAAABh5w From: "Sriram Dandapani" To: "Tom Lane" Cc: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.02 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200608/367 X-Sequence-Number: 22910 The issue is that the drop table immediately puts the jdbc insert into a wait state and goes into a wait state itself.=20 -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us]=20 Sent: Thursday, August 31, 2006 1:37 PM To: Sriram Dandapani Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] archive logs recovery=20 "Sriram Dandapani" writes: > I have a very high traffic db with lots of table partitions. The only > reliable way to drop the partitioned tables is to prevent any > insert/select on the parent table , otherwise, the drop table locks out > the inserts, and strangely enough, the drop table command goes into a > wait state. During shutdown and restart, I switch the pg_hba.conf to > disallow client access for a brief period when the tables are dropped. You do know you can change pg_hba.conf without a restart? As for the drop going into a wait state, you might want to look around for client code that's sitting idle with an open transaction. The drop should not block for longer than whatever is your longest transaction touching that table. regards, tom lane