Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id F1B7B9FA344 for ; Tue, 24 Oct 2006 20:56:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 66729-10 for ; Tue, 24 Oct 2006 20:56:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mx1.linuxlouis.net (mx1.linuxlouis.net [70.88.107.105]) by postgresql.org (Postfix) with ESMTP id 664D09F95CB for ; Tue, 24 Oct 2006 20:56:17 -0300 (ADT) Received: from [192.168.0.3] (wap.linuxlouis.net [70.88.107.106]) (authenticated bits=0) by mx1.linuxlouis.net (8.13.4/8.13.4) with ESMTP id k9P00Jk7012727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 24 Oct 2006 20:00:23 -0400 Message-ID: <453EA81B.1070208@linuxlouis.net> Date: Tue, 24 Oct 2006 19:56:11 -0400 From: louis gonzales User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard Broersma Jr CC: Emmanuel Courcelle , pgsql-admin@postgresql.org Subject: Re: database "postgres" does not exist References: <20061024170230.6595.qmail@web31814.mail.mud.yahoo.com> In-Reply-To: <20061024170230.6595.qmail@web31814.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.064 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/156 X-Sequence-Number: 23459 Richard, Are you sure that you weren't typing an additional argument, such as: sudo -u postgres psql db_name Reason I ask is because, by default running the command psql assumes some things if you don't call them out explicitly such as: psql assumes: -h 127.0.0.1 -p 5432 (or whichever was compiled in) user_name (database name, named that of the user) user_name (user name, named that of the user) so when you type: sudo -u postgres psql, I think it's interpreted as: sudo -u postgres -h 127.0.0.1 -p 5432 postgres postgres sudo -u postgres psql -d template1 (implies a user of postgres) and that's why it works. Richard Broersma Jr wrote: >>Hello everybody >>We have a very strange problem here: we have been using postgresql for >>several years now, it runs fine without any problem. >>BUT today, we saw something I do not understand: >>when I try to use psql like this: >>sudo -u postgres psql >>I get the message psql: FATAL: database "postgres" does not exist >>About 1-2 months ago, this was OK >>I know this message is current on a new installation when the system is >>NOT initialized. >>But what puzzles me here is that the database postgres DID exist... but >>it seems to have suddenly disappeared !!!! >>A part from this, everything works fine, for example the command: >> sudo -u postgres psql -d template1 >>works, and the postgres applications run quite smoothly >>So, here is my question: how such a thing could have happen ? We cannot >>remeber any stupid thing we could have done (but may be we did... And >>what do I have to do to recreate the postgres database... in fact, is it >>even necessary doing so ? >> >> > >If you issue "\l" from within the posgresql command prompt does it list postgres as a database? >If it does not show up, my guess is that is was dropped. > >Regards, > >Richard Broersma Jr. > >---------------------------(end of broadcast)--------------------------- >TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > > -- Email: louis.gonzales@linuxlouis.net WebSite: http://www.linuxlouis.net "Open the pod bay doors HAL!" -2001: A Space Odyssey "Good morning starshine, the Earth says hello." -Willy Wonka