From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Linabery <slinabery@worldcycling.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-hackers@postgresql.org
Subject: Re: can't get connection during pg_dump
Date: Thu, 30 Mar 2006 12:17:11 -0500
Message-ID: <15977.1143739031@sss.pgh.pa.us> (raw)
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>
Steve Linabery <slinabery@worldcycling.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, slinabery@worldcycling.com, pgsql-hackers@postgresql.org
Subject: Re: can't get connection during pg_dump
In-Reply-To: <15977.1143739031@sss.pgh.pa.us>
References: <26980667.1143734442919.JavaMail.root@mail.worldcycling.com> <523929.1143735343754.JavaMail.root@mail.worldcycling.com> <682391.1143736889382.JavaMail.root@mail.worldcycling.com> <15977.1143739031@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox