Home > Archive > PostgreSQL Discussion > April 2006 > Database lost after reboot









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Database lost after reboot
Diego Manilla Suárez

2006-04-06, 1:29 pm

Hi. I have PostgreSQL 7.4.8 installed on a SuSE Enterprise Server 9.
When I create a database, everything works fine until I restart the
computer. When I do that, and I try to connect to the database, I get
the following message;

psql: FATAL: database "mydb" does not exist
DETAIL: The database subdirectory "/var/lib/pgsql/data/base/1964658" is
missing.

No dir is removed during the reboot, (I checked that, and the subdirs on
/var/lib/pgsql/data/base were exactly the same before and after the
reboot), and 1964658 does not exist (didn't exist before the reboot,
either), so it seems that postgres loses the reference to the dir where
data is stored. It doesn't happen all the time. The rest of the software
on that computer is working fine.

Does anyone know what can be causing this behaviour?

Thanks in advance


---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Tom Lane

2006-04-06, 1:29 pm

=?ISO-8859-1?Q? Diego_Manilla_Su=E1r
ez?= <diego.manilla@xeridia.com> writes:
> Hi. I have PostgreSQL 7.4.8 installed on a SuSE Enterprise Server 9.
> When I create a database, everything works fine until I restart the
> computer. When I do that, and I try to connect to the database, I get
> the following message;


> psql: FATAL: database "mydb" does not exist
> DETAIL: The database subdirectory "/var/lib/pgsql/data/base/1964658" is
> missing.


Hmm, are you allowing the postmaster to shut down normally before you
reboot? (Not that it shouldn't work anyway, I'm just trying to gather
details.) What is the OID of the missing database? Try connecting to
template1 and then doing "select oid,datname from pg_database". If you
don't see mydb, or if it's got a different OID from the number mentioned
in the error message, that would tell something.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com