meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:databases:psql:issues [2023/07/28 11:51] – created niziaklinux:databases:psql:issues [2023/07/28 12:07] (current) niziak
Line 4: Line 4:
  
 After unclean shutdown: After unclean shutdown:
-<code>client= LOG:  invalid primary checkpoint record</code>+<code> 
 +user=,db=,app=,client= LOG:  invalid primary checkpoint record 
 +user=,db=,app=,client= PANIC:  could not locate a valid checkpoint record 
 +</code>
  
 Postgresql running from official docker container. Postgresql running from official docker container.
  
-Solution:+**Solution:** 
 + 
 +Prevent container from restarting: 
 +<code bash>docker-compose stop db</code> 
 +<file yaml docker-compose.yml> 
 +services: 
 +  db: 
 +    image: postgres:12-alpine 
 +    command: bash 
 +</file> 
 + 
 +run it interactively: 
 +<code bash>docker-compose run db</code> 
 + 
 +and reset WAL: 
 <code bash> <code bash>
 su postgres -c '/usr/local/bin/pg_resetwal -f /var/lib/postgresql/data' su postgres -c '/usr/local/bin/pg_resetwal -f /var/lib/postgresql/data'
 </code> </code>