Re: [GENERAL] Can't restart Postgres - Mailing list pgsql-general

From Tom Lane
Subject Re: [GENERAL] Can't restart Postgres
Date
Msg-id 16444.1487178557@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] Can't restart Postgres  (Shawn Thomas <thomassd@u.washington.edu>)
List pgsql-general
Shawn Thomas <thomassd@u.washington.edu> writes:
> I’m thinking that at this point I need to approach this problem as more of a disaster recovery.  There was a full
pg_dumpall file that was deleted and cannot be recovered so I need to recover the data from the
/var/lib/postgresql/9.4/maindirectory.  I believe this is called a file level recovery.  I assume I need to use a fully
functional,same version PG (on another machine?) to create a full dump of the data directory.  Once I have this I can
re-installPostgres on the initial server and read the databases back into it.  

Seems like the hard way.  Rename the data directory out of the way, delete
and reinstall the Postgres packages, and once you've confirmed it works
again, rename the data directory back into place (while the server is
stopped!)

If renaming the old data directory back into place makes it start failing
again, then you've narrowed down the problem to something about the
permissions or contents of the data directory itself or the configuration
files therein.

            regards, tom lane


pgsql-general by date:

Previous
From: Shawn Thomas
Date:
Subject: Re: [GENERAL] Can't restart Postgres
Next
From: Magnus Hagander
Date:
Subject: Re: [GENERAL] Can't restart Postgres