Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 605 Bytes

PostgresqlStuckInRecovery.md

File metadata and controls

34 lines (23 loc) · 605 Bytes
description
Fixing the Postgres 'server stuck in a recovery loop' issue.

PostgreSQL Server stuck in recovery loop - not starting up

Errors in log file observed:

PANIC:  could not locate a valid checkpoint record

LOG:  connection received: host=[local]
FATAL:  the database system is starting up

Referrence:

https://stackoverflow.com/questions/8799474/postgresql-error-panic-could-not-locate-a-valid-checkpoint-record

Solution:

PostgreSQL < version 10:

oc debug <pod>
pg_resetxlog [-f] DATADIR

PostgreSQL >= version 10:

oc debug <pod>
pg_resetwal [-f] DATADIR