Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id A18A39FA068 for ; Thu, 13 Sep 2007 00:22:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 31898-05 for ; Thu, 13 Sep 2007 00:21:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id B01839F9A1B for ; Thu, 13 Sep 2007 00:21:16 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l8D3LDfi025729; Wed, 12 Sep 2007 23:21:13 -0400 (EDT) To: Dan Harris cc: PostgreSQL Performance Subject: Re: pg_dump blocking create database? In-reply-to: <46E844EC.5050802@drivefaster.net> References: <46E844EC.5050802@drivefaster.net> Comments: In-reply-to Dan Harris message dated "Wed, 12 Sep 2007 13:58:36 -0600" Date: Wed, 12 Sep 2007 23:21:13 -0400 Message-ID: <25728.1189653673@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/237 X-Sequence-Number: 26782 Dan Harris writes: > My PG server came to a screeching halt yesterday. Looking at top saw a very > large number of "startup waiting" tasks. A pg_dump was running and one of my > scripts had issued a CREATE DATABASE command. It looks like the CREATE DATABASE > was exclusive but was having to wait for the pg_dump to finish, causing a > massive traffic jam of locks behind it. > Once I killed the pg_dump process, things returned to normal. > Version 8.0.12. Is this a bug? It's operating as designed :-(. 8.1 and later use less strict locking on pg_database during create/drop database. regards, tom lane