Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uq5IL-00082I-Vy for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Jun 2013 17:38:46 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Uq5IL-0001zl-F7 for pgsql-bugs@arkaria.postgresql.org; Fri, 21 Jun 2013 17:38:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uq5IK-0001yj-EN for pgsql-bugs@postgresql.org; Fri, 21 Jun 2013 17:38:44 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uq5IG-0003uw-T3 for pgsql-bugs@postgresql.org; Fri, 21 Jun 2013 17:38:44 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Uq5IE-0005vV-0D for pgsql-bugs@postgresql.org; Fri, 21 Jun 2013 17:38:38 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1Uq5I8-0002bm-GF for pgsql-bugs@postgresql.org; Fri, 21 Jun 2013 17:38:32 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8247: Duplicate database names - pg_dump backup fails To: pgsql-bugs@postgresql.org From: paul.macdonald@ssc-spc.gc.ca Message-Id: Date: Fri, 21 Jun 2013 17:38:32 +0000 X-Pg-Spam-Score: -3.4 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8247 Logged by: Paul Macdonald Email address: paul.macdonald@ssc-spc.gc.ca PostgreSQL version: Unsupported/Unknown Operating system: Debian Sarge Description: Postgres version: 7.4.7-6sarge1 Issue: pg_dump fails due to unexpected duplication of database name ("avipads"). Dropdb will remove one instance of the database name, but unable to remove the second instance. Scope: This specific database is used on multiple servers nationally. Three of our servers have this issue, the majority do not. The issue only affects our ability to locally backup the "avipads" database. The servers having the problem are clustered pair systems. The other cluster pair servers do not have the problem. Name | Owner | Encoding -----------+-------------+----------- avipads | | SQL_ASCII avipads | avimgr | SQL_ASCII rtadb | rtafbackend | SQL_ASCII rtafdb | rtafbackend | SQL_ASCII template0 | postgres | SQL_ASCII template1 | postgres | SQL_ASCII When a new version of the database is available for installation, the installation script does the following steps a) remove the old database su - avimgr -c "dropdb --quiet --username=avimgr avipads" || true b) remove the avimgr user su - postgres -c "dropuser --quiet avimgr" || true c) create the avimgr Posgresql user su - postgres -c "createuser avimgr --no-adduser --createdb --quiet; true" 2> /dev/null d) install the new database su - avimgr -c "/apps/avipads/voicedb/restorevoice /apps/avipads/voicedb/vdb2.5.1.pg" I would like details on how to successfully remove both "avipads" databases, in order to have the pg_dump be functional again. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs