当前位置:网站首页>PgSQL mistakenly deletes PG_ Wal file, service startup failed
PgSQL mistakenly deletes PG_ Wal file, service startup failed
2022-07-23 16:24:00 【I'll go to bed at twelve】
LOG: aborting startup due to startup process failure
LOG: database system was interrupted;
LOG: unexpected pagedir
LOG: invalid secondary checkpoint record
PANIC: could not locate a valid checkpoint record
One 、 Question why
Database log corruption , Log consistency needs to be reset .
Two 、 terms of settlement
1、 Switch to postgres User reset database log
su - postgres
pg_resetwal -f /var/lib/postgresql/data/pgdata/
3、 ... and 、 operation
1、 Start a container first :
docker run -it --restart=always --name postgres_primary -p 5432:5432 -v /opt/postgres_data/data:/var/lib/postgresql/data/ -v /etc/localtime:/etc/localtime --env-file primary.env postgres_primary /bin/bash
perform :
su - postgres
pg_resetwal -f /var/lib/postgresql/data/pgdata/
Exit the container and delete
2、 Restart the service container
docker run -d --restart=always --name postgres_primary -p 5432:5432 -v /opt/postgres_data/data:/var/lib/postgresql/data/ -v /etc/localtime:/etc/localtime --env-file primary.env postgres_primary
边栏推荐
猜你喜欢

sqlnet. Ora-12154 and ora-01017 connection exceptions caused by incorrect ora file settings

MySQL - master-slave replication

【深入浅出向】从自信息到熵、从相对熵到交叉熵,nn.CrossEntropyLoss, 交叉熵损失函数与softmax,多标签分类

死锁、饥饿、死循环之间的区别

SharedPreferences data storage

W3C 推出去中心化标识符作为 Web 标准

2022蓝帽杯初赛wp

Bean validation beginner ----02

SOC的第一个Hello_World实验

Idées de conception sur l'initialisation des paramètres d'entrée de page
随机推荐
死锁的3种处理策略
New infrastructure of enterprise data in the era of digital transformation | love Analysis Report
知道为什么PCBA电路板会板翘吗?
Of the 24 almost inevitable JVM interview questions, I only know 7. How many can you answer?
table自定义表格的封装
Mysql—主从复制
FMDB的封装与使用
信箱通信-
It's too hard! Tencent T4 boss was still staying up late at 4 a.m. and was actually sorting out the distributed transaction notes
lc marathon 7.23
黑马程序员-接口测试-四天学习接口测试-第三天-postman高级用法,newman例集导出导入,常用断言,断言json数据,工作原理,全局,环境变量,时间戳,请求前置脚本,关联,批量执行测试用例
20220721挨揍内容
Vinka introduces high anti-interference vk36n series touch IC: vk36n1d, vk36n2p, vk36n3b, vk36n4i, easy to use
AC automata and fail tree
Bean Validation起源篇----01
sqlnet. Ora-12154 and ora-01017 connection exceptions caused by incorrect ora file settings
CA数字证书
First hello of SOC_ World experiment
Squid 代理服务之透明代理服务器架构搭建
es6把多个class方法合并在一起