X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8E62DD8A09 for ; Thu, 3 Nov 2005 15:31:24 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53524-02 for ; Thu, 3 Nov 2005 19:31:20 +0000 (GMT) X-Greylist: delayed 00:09:50.864453 by SQLgrey- Received: from flake.decibel.org (flake.decibel.org [67.100.216.10]) by svr1.postgresql.org (Postfix) with ESMTP id 5738ED86A1 for ; Thu, 3 Nov 2005 15:31:20 -0400 (AST) Received: by flake.decibel.org (Postfix, from userid 1001) id A24851524F; Thu, 3 Nov 2005 13:31:19 -0600 (CST) Date: Thu, 3 Nov 2005 13:31:19 -0600 From: "Jim C. Nasby" To: Colton A Smith Cc: pgsql-admin@postgresql.org Subject: Re: pg_dump and truncate Message-ID: <20051103193119.GU55520@pervasive.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 4.11-RELEASE-p10 i386 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.008 required=5 tests=[AWL=0.008] X-Spam-Score: 0.008 X-Spam-Level: X-Archive-Number: 200511/35 X-Sequence-Number: 19408 On Thu, Nov 03, 2005 at 11:43:37AM -0500, Colton A Smith wrote: > Hi: > > While pg_dump is dumping my database, I find that when I try to truncate > a table the query hangs. Is that the expected behavior? What if I try > to drop a table? Will that hang as well? Yes. dump grabs an AccessSharedLock on everything it's going to dump. -- 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