基础环境:
数据库版本:6.2.1 1master+4个节点集群,每个segment 2个primary 2mirror,但是mirror一直是down状态,没有进行恢复,持续运行了半年以上。
现象说明:
由于pg_xlog目录快满了,因此进行删除,通过网上进行查询首先用pg_controldata查询Latest checkpoint's NextXID/Latest checkpoint's NextOID值进行pg_resetxlog删除,但是查询结果如下:
[gpadmin@gpnode_05 gpseg7]$ pg_controldata .
WARNING: Calculated CRC checksum does not match value stored in file.
Either the file is corrupt, or it has a different layout than this program
is expecting. The results below are untrustworthy.
标红字段说明查询结果不可信
pg_control version number: 9420600
Catalog version number: 301908232
Database system identifier: 6826204391629797153
Database cluster state: in production
pg_control last modified: Thu 01 Apr 2021 0214 PM CST
Latest checkpoint location: FEA274E8/55
Prior checkpoint location: FE3C41D8/55
Latest checkpoint's REDO location: FEA274E8/55
Latest checkpoint's TimeLineID: 1
Latest checkpoint's full_page_writes: on
Latest checkpoint's NextXID: 1/0 -----此值为什么是1/0
Latest checkpoint's NextOID: 24346798
Latest checkpoint's NextMultiXactId: 830087
Latest checkpoint's NextMultiOffset: 403920
Latest checkpoint's oldestXID: 1
Latest checkpoint's oldestXID's DB: 0
Latest checkpoint's oldestActiveXID: 24578
Time of latest checkpoint: Sun 07 Feb 2106 0954 PM CST
Minimum recovery ending location: 606568EE/0
Backup start location: 0/0
Backup end location: 1/0
End-of-backup record required: no
Current wal_level setting: minimal
Current max_connections setting: 0
Current max_prepared_xacts setting: 0
Current max_locks_per_xact setting: 0
Maximum data alignment: 0
Database block size: 0
Blocks per segment of large relation: 1
WAL block size: 0
Bytes per WAL segment: 750
Maximum length of identifiers: 14
Maximum columns in an index: 250
Maximum size of a TOAST chunk: 128
Date/time type storage: 64-bit integers
Float4 argument passing: by reference
Float8 argument passing: by reference
我该如何操作进行删除pg_xlog??