Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1FE1F6356A0 for ; Tue, 20 Apr 2010 13:28:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 46995-04-6 for ; Tue, 20 Apr 2010 16:28:11 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-gy0-f174.google.com (mail-gy0-f174.google.com [209.85.160.174]) by mail.postgresql.org (Postfix) with ESMTP id 84C436368B5 for ; Tue, 20 Apr 2010 13:06:26 -0300 (ADT) Received: by gyg13 with SMTP id 13so3271619gyg.19 for ; Tue, 20 Apr 2010 09:06:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=J12n5hPXOHHrPI42WoO2SwvSDILt5rEr6xIaNLDeYsY=; b=T7AkRep3VLXq/ndYeL6VgUr7bfScd1y8R5BbjTIgs8CUz06qPitHoEdBuYcGLXCCes zZScw7t/DWJHVO0aOAmbLkexZckFT/+uvfMWOxrsr/vFAHeAsbjgLS5nMJD4utiE2f/W RdLfP4f6FXKb3iLJnamZIuSj9dsSPZohk/IBs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=i/60fgeIMWhlkagIotog/9pZeqTK4i5LrL3C3qk9Orf6aHaLPCBkmYDi6Y8c8le78P t9C9MmB0FsiLJZHzwnlBonrlRHQdDHvLrpDBd+SuqL6YqXhEMWm7zBBzaRj+UaquCtS6 GeAgXmxivGMjvLDqFRK6CzMV0wCNHDd9GYY6k= MIME-Version: 1.0 Received: by 10.150.218.9 with HTTP; Tue, 20 Apr 2010 09:06:25 -0700 (PDT) In-Reply-To: References: Date: Tue, 20 Apr 2010 10:06:25 -0600 Received: by 10.151.115.6 with SMTP id s6mr7617472ybm.294.1271779585613; Tue, 20 Apr 2010 09:06:25 -0700 (PDT) Message-ID: Subject: Re: drop database / create database / data still here ? From: Scott Marlowe To: Mitch Collinsworth Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.082 tagged_above=-10 required=5 tests=AWL=-0.182, BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/289 X-Sequence-Number: 34383 On Tue, Apr 13, 2010 at 12:16 PM, Mitch Collinsworth wrote: > > Hi Folks, > > I thought I understood how this worked, but now it's baffling me. > I want to drop a database named coral from my test server and load > a fresh dump of it from my production server. =A0This has worked when > I've done it before, but now it's giving me fits. =A0Here's an > example: > > coral=3D# \c postgres > You are now connected to database "postgres". > postgres=3D# drop database coral; > DROP DATABASE > postgres=3D# create database coral; > CREATE DATABASE > postgres=3D# \c coral > You are now connected to database "coral". > coral=3D# \dt *.* > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 List of relations > =A0 =A0 =A0 Schema =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 =A0Name =A0 =A0 = =A0 =A0 =A0 =A0 =A0| Type =A0| =A0Owner > --------------------+--------------------------------+-------+---------- > =A0accmgr =A0 =A0 =A0 =A0 =A0 =A0 | acct_rate =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0| table | accmgr > =A0accmgr =A0 =A0 =A0 =A0 =A0 =A0 | acct_rate_working =A0 =A0 =A0 =A0 =A0= =A0 =A0| table | accmgr > =A0accmgr =A0 =A0 =A0 =A0 =A0 =A0 | acct_sum =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 | table | accmgr > =A0accmgr =A0 =A0 =A0 =A0 =A0 =A0 | acct_sum_raw =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 | table | accmgr I'm pretty sure that at some time you accidentally created those tables in template1 and now you're getting them every time you create a database. Clean out template1 and things should be ok.