[highgo@localhost data]$ pg_resetwal -l 000000040000000000000017 -x 0x100000 -m 0x10000,0x10000 -O 0xCC80 -f $PGDATA pg_resetwal: pg_control exists but is broken or wrong version; ignoring it Write-ahead log reset [highgo@localhost data]$ ll global/pg_control -rw------- 1 highgo highgo 8192 Aug 13 10:06 global/pg_control [highgo@localhost data]$ pg_controldata pg_control version number: 1002 Catalog version number: 201707211 Database system identifier: 6860284186546668097 Database cluster state: shut down pg_control last modified: Thu Aug 13 10:06:22 2020 Latest checkpoint location: 0/17000028 Prior checkpoint location: 0/0 Latest checkpoint's REDO location: 0/17000028 Latest checkpoint's REDO WAL file: 000000040000000000000017 Latest checkpoint's TimeLineID: 4 Latest checkpoint's PrevTimeLineID: 4 Latest checkpoint's full_page_writes: off Latest checkpoint's NextXID: 0:1048576 Latest checkpoint's NextOID: 10000 Latest checkpoint's NextMultiXactId: 65536 Latest checkpoint's NextMultiOffset: 52352 Latest checkpoint's oldestXID: 2296015872 Latest checkpoint's oldestXID's DB: 0 Latest checkpoint's oldestActiveXID: 0 Latest checkpoint's oldestMultiXid: 65536 Latest checkpoint's oldestMulti's DB: 0 Latest checkpoint's oldestCommitTsXid:0 Latest checkpoint's newestCommitTsXid:0 Time of latest checkpoint: Thu Aug 13 10:06:22 2020 Fake LSN counter for unlogged rels: 0/1 Minimum recovery ending location: 0/0 Min recovery ending loc's timeline: 0 Backup start location: 0/0 Backup end location: 0/0 End-of-backup record required: no wal_level setting: minimal wal_log_hints setting: off max_connections setting: 100 max_worker_processes setting: 8 max_prepared_xacts setting: 0 max_locks_per_xact setting: 64 track_commit_timestamp setting: off Maximum data alignment: 8 Database block size: 8192 Blocks per segment of large relation: 131072 WAL block size: 8192 Bytes per WAL segment: 16777216 Maximum length of identifiers: 64 Maximum columns in an index: 32 Maximum size of a TOAST chunk: 1996 Size of a large-object chunk: 2048 Date/time type storage: 64-bit integers Float4 argument passing: by value Float8 argument passing: by value Data page checksum version: 0 Data encryption: off Mock authentication nonce: 0000000000000000000000000000000000000000000000000000000000000000
6、启动数据库检查数据:
[highgo@localhost data]$ pg_ctl start waiting for server to start....2020-08-13 10:09:40.177 CSTWARNING: 01000: gdb version should large than 7.10 2020-08-13 10:09:40.177 CSTWARNING: 01000: coredump function is off 2020-08-13 10:09:40.193 CSTLOG: 00000: listening on IPv4 address "0.0.0.0", port 5868 2020-08-13 10:09:40.193 CSTLOG: 00000: listening on IPv6 address "::", port 5868 2020-08-13 10:09:40.207 CSTLOG: 00000: listening on Unix socket "/tmp/.s.PGSQL.5868" 2020-08-13 10:09:40.347 CSTLOG: 00000: redirecting log output to logging collector process 2020-08-13 10:09:40.347 CSTHINT: Future log output will appear in directory "hgdb_log". done server started [highgo@localhost data]$ [highgo@localhost data]$ [highgo@localhost data]$ psql psql (5.6.4)
PSQL: Release 5.6.4 Connected to: HighGo Database V5.6 Enterprise Edition Release 5.6.4 - 64-bit Production
Type "help" for help.
highgo=# \d List of relations Schema | Name | Type | Owner --------+--------------------------+-------+-------- public | oid_test | table | highgo public | pg_stat_statements | view | highgo public | pg_wait_sampling_current | view | highgo public | pg_wait_sampling_history | view | highgo public | pg_wait_sampling_profile | view | highgo public | t1 | table | highgo (6 rows)
highgo=# select min(oid),max(oid) from oid_test ; min | max -------+-------- 24659 | 124658 (1 row)
highgo=# \q [highgo@localhost data]$ pg_ctl stop -m f waiting for server to shut down.... done server stopped [highgo@localhost data]$ pg_controldata pg_control version number: 1002 Catalog version number: 201707211 Database system identifier: 6860284186546668097 Database cluster state: shut down pg_control last modified: Thu Aug 13 10:11:48 2020 Latest checkpoint location: 0/17D48240 Prior checkpoint location: 0/17000028 Latest checkpoint's REDO location: 0/17D48240 Latest checkpoint's REDO WAL file: 000000040000000000000017 Latest checkpoint's TimeLineID: 4 Latest checkpoint's PrevTimeLineID: 4 Latest checkpoint's full_page_writes: on Latest checkpoint's NextXID: 0:1048579 Latest checkpoint's NextOID: 116384 Latest checkpoint's NextMultiXactId: 65536 Latest checkpoint's NextMultiOffset: 52352 Latest checkpoint's oldestXID: 553 Latest checkpoint's oldestXID's DB: 13864 Latest checkpoint's oldestActiveXID: 0 Latest checkpoint's oldestMultiXid: 1 Latest checkpoint's oldestMulti's DB: 13864 Latest checkpoint's oldestCommitTsXid:0 Latest checkpoint's newestCommitTsXid:0 Time of latest checkpoint: Thu Aug 13 10:11:47 2020 Fake LSN counter for unlogged rels: 0/1 Minimum recovery ending location: 0/0 Min recovery ending loc's timeline: 0 Backup start location: 0/0 Backup end location: 0/0 End-of-backup record required: no wal_level setting: replica wal_log_hints setting: off max_connections setting: 2000 max_worker_processes setting: 10 max_prepared_xacts setting: 0 max_locks_per_xact setting: 64 track_commit_timestamp setting: off Maximum data alignment: 8 Database block size: 8192 Blocks per segment of large relation: 131072 WAL block size: 8192 Bytes per WAL segment: 16777216 Maximum length of identifiers: 64 Maximum columns in an index: 32 Maximum size of a TOAST chunk: 1996 Size of a large-object chunk: 2048 Date/time type storage: 64-bit integers Float4 argument passing: by value Float8 argument passing: by value Data page checksum version: 0 Data encryption: off Mock authentication nonce: 0000000000000000000000000000000000000000000000000000000000000000 [highgo@localhost data]$