When I load up the postgres server (v9.0.1) i get a panic that prevents it from starting:
PANIC: could not locate a valid checkpoint record
How can I fix this?
When I load up the postgres server (v9.0.1) i get a panic that prevents it from starting:
PANIC: could not locate a valid checkpoint record
How can I fix this?
I'm running 9.1.7 and i find ran the following successfully:
Your final argument to the
pg_resetxlog
command should be the location on disk where postgres stores your database data.As indicated here pg_resetxlog should not be run. The answers that refer to this is bad advice. Assuming the error occured in a context of copy/replication instance, the link provides a more succinct way of doing copy/replication with
pg_basebackup
Do you do continuous archiving? If you are backing up at the time, you may find it more prudent to remove backup_label.
pg_resetxlog
is a severe thing.It's looking for a checkpoint record in the transaction log that probably doesn't exist or is corrupted. You can determine if this is the case by running:
If the transaction log is corrupt, you'll see a message like:
You can then follow the instructions and run with
-f
to force the update:That should reset the transaction log, however it could leave your database in an indeterminate state as explained in the PostgreSQL documentation on
pg_resetxlog
:just like the log saying : could not locate a valid checkpoint record.Postgres can't find a properly WAL under the $PGDATA/pg_xlog/ directory. Try to use pg_resetxlog