Re: [GENERAL] Where is my database gone ? - Mailing list pgsql-general

From Adriaan Joubert
Subject Re: [GENERAL] Where is my database gone ?
Date
Msg-id 3879BF9A.BFB91A83@albourne.com
Whole thread Raw
In response to Where is my database gone ?  (Guillaume Rousse <Guillaume.Rousse@univ-reunion.fr>)
List pgsql-general
Guillaume Rousse wrote:

> My database coraux isn't listed anymore when i use psql -l, altough i can still
> connect to it using psql coraux, but there isn't any tables listed by \dt.
> Files are still present in $PGDATA, with their content.
> What's the problem, and how can i recover it ?

Most likely cause is that either the user that created the database does not exist
anymore or your permissions got messed up somehow. I've seen similar behaviour
when the user does not exist. You can see who owns the tables by doing

select relname,relowner from pg_class;

Then do

select * from pg_user to figure out which user the relowner corresponds to. If the
user is missing, create a enw one with the required uid.

Adriaan


pgsql-general by date:

Previous
From: Guillaume Rousse
Date:
Subject: Where is my database gone ?
Next
From: Moser Marco
Date:
Subject: gen