pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddatabase "postgres" does not exist
5+ messages / 4 participants
[nested] [flat]
* database "postgres" does not exist
@ 2006-10-24 16:39 Emmanuel Courcelle <emmanuel.courcelle@toulouse.inra.fr>
0 siblings, 2 replies; 5+ messages in thread
From: Emmanuel Courcelle @ 2006-10-24 16:39 UTC (permalink / raw)
To: pgsql-admin
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 ?
The OS is a 64bits Debian (distribution testing, dist-upgraded today but
this did not correct the problem)
The postgres version is 8.1.4
Thanks in advance,
--
Emmanuel COURCELLE emmanuel.courcelle@toulouse.inra.fr
L.I.P.M. (UMR CNRS-INRA 2594/441) tel (33) 5-61-28-54-50
B.P.52627 - 31326 CASTANET TOLOSAN Cedex - FRANCE
------
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: database "postgres" does not exist
@ 2006-10-24 17:02 Richard Broersma Jr <rabroersma@yahoo.com>
parent: Emmanuel Courcelle <emmanuel.courcelle@toulouse.inra.fr>
1 sibling, 1 reply; 5+ messages in thread
From: Richard Broersma Jr @ 2006-10-24 17:02 UTC (permalink / raw)
To: Emmanuel Courcelle <emmanuel.courcelle@toulouse.inra.fr>; pgsql-admin
> 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.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: database "postgres" does not exist
@ 2006-10-24 23:56 louis gonzales <gonzales@linuxlouis.net>
parent: Richard Broersma Jr <rabroersma@yahoo.com>
0 siblings, 1 reply; 5+ messages in thread
From: louis gonzales @ 2006-10-24 23:56 UTC (permalink / raw)
To: Richard Broersma Jr <rabroersma@yahoo.com>; +Cc: Emmanuel Courcelle <emmanuel.courcelle@toulouse.inra.fr>; pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: database "postgres" does not exist
@ 2006-10-25 00:14 Richard Broersma Jr <rabroersma@yahoo.com>
parent: louis gonzales <gonzales@linuxlouis.net>
0 siblings, 0 replies; 5+ messages in thread
From: Richard Broersma Jr @ 2006-10-25 00:14 UTC (permalink / raw)
To: louis gonzales <gonzales@linuxlouis.net>; +Cc: Emmanuel Courcelle <emmanuel.courcelle@toulouse.inra.fr>; pgsql-admin
> Richard,
> Are you sure that you weren't typing an additional argument, such as:
> sudo -u postgres psql db_name
I'm not the one having problems connecting to the postgres database ;)
Regards,
Richard Broersma Jr.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: database "postgres" does not exist
@ 2006-10-25 08:09 Enrico <scotty@linuxtime.it>
parent: Emmanuel Courcelle <emmanuel.courcelle@toulouse.inra.fr>
1 sibling, 0 replies; 5+ messages in thread
From: Enrico @ 2006-10-25 08:09 UTC (permalink / raw)
To: pgsql-admin
On Tue, 24 Oct 2006 18:39:48 +0200
Emmanuel Courcelle <emmanuel.courcelle@toulouse.inra.fr> wrote:
> when I try to use psql like this:
> sudo -u postgres psql
> I get the message:
> psql: FATAL: database "postgres" does not exist
Are you sure that postgres database really exists?
Try psql dbname -U postgres
Bye Enrico
--
If Bill Gates had a penny for everytime Windows crashed,he'd be a multi-billionaire by now .......oh look, he already is !!!!
scotty@linuxtime.it - Skype:sscotty71
http://www.linuxtime.it/enricopirozzi
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2006-10-25 08:09 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-10-24 16:39 database "postgres" does not exist Emmanuel Courcelle <emmanuel.courcelle@toulouse.inra.fr>
2006-10-24 17:02 ` Richard Broersma Jr <rabroersma@yahoo.com>
2006-10-24 23:56 ` louis gonzales <gonzales@linuxlouis.net>
2006-10-25 00:14 ` Richard Broersma Jr <rabroersma@yahoo.com>
2006-10-25 08:09 ` Enrico <scotty@linuxtime.it>
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