X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 1726D11F6959; Thu, 30 Mar 2006 13:17:15 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 17138-07; Thu, 30 Mar 2006 13:17:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 1F7A711F694D; Thu, 30 Mar 2006 13:17:11 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k2UHHBNv015978; Thu, 30 Mar 2006 12:17:11 -0500 (EST) To: Steve Linabery cc: pgsql-admin@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: can't get connection during pg_dump In-reply-to: <682391.1143736889382.JavaMail.root@mail.worldcycling.com> References: <26980667.1143734442919.JavaMail.root@mail.worldcycling.com> <523929.1143735343754.JavaMail.root@mail.worldcycling.com> <682391.1143736889382.JavaMail.root@mail.worldcycling.com> Comments: In-reply-to Steve Linabery message dated "Thu, 30 Mar 2006 10:41:28 -0600" Date: Thu, 30 Mar 2006 12:17:11 -0500 Message-ID: <15977.1143739031@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.114 required=5 tests=[AWL=0.114] X-Spam-Score: 0.114 X-Spam-Level: X-Archive-Number: 200603/382 X-Sequence-Number: 21139 Steve Linabery writes: > I just replicated the problem, see below for explanation, but here is ps output: > postgres 25817 3201 55 10:20 ? 00:02:54 postgres: postgres db_being_dumped [local] COPY > postgres 27956 3201 46 10:24 ? 00:00:36 postgres: postgres db_being_dumped [local] COPY > postgres 28124 3201 0 10:25 ? 00:00:00 postgres: dbusername template1 obfus.ip.address.36(49528) DROP DATABASE waiting > postgres 28180 3201 0 10:25 ? 00:00:00 postgres: dbusername db_being_dumped obfus.ip.address.37(48997) startup waiting > postgres 28183 3201 0 10:25 ? 00:00:00 postgres: dbusername db_being_dumped obfus.ip.address.36(49532) startup waiting Hm. DROP DATABASE takes ExclusiveLock on pg_database, which blocks new incoming connections, and both of those things are intentional (part of the point of the lock is to block new connections to the victim database, so it's hard to see how we could avoid this). What doesn't seem so essential though is for pg_dump to be holding a conflicting lock on pg_database. In fact, a plain AccessShareLock wouldn't block DROP DATABASE, so I'm not entirely sure that pg_dump is at fault. Could we see the contents of pg_locks for this situation? regards, tom lane