After the computer room is powered off, the pg database is restarted and the following error is reported:
< 2019-01-01 22:42:59.240 EST >LOG: database system was interrupted while in recovery at 2019-01-01 22:00:58 EST < 2019-01-01 22:42:59.240 EST >HINT: This probably means that some data is corrupted and you will have to use the last backup for recovery. < 2019-01-01 22:42:59.241 EST >LOG: database system was not properly shut down; automatic recovery in progress < 2019-01-01 22:42:59.333 EST >PANIC: unexpected pageaddr 26EA/46000000 in log segment 00000001000026EA00000017, offset 0 < 2019-01-01 22:42:59.333 EST >LOG: startup process (PID 88586) was terminated by signal 6: Aborted < 2019-01-01 22:42:59.333 EST >LOG: aborting startup due to startup process failure
Fix method:
Switch to the bin directory:
cd /usr/pgsql-9.3/bin
Use the pg_resetxlog command to repair the log: (/var/lib/pgsql/9.3/data is the directory of pg_data)
pg_resetxlog -f /var/lib/pgsql/9.3/data
Restart the database:
pg_ctl start
Additional: Solutions to the PostgreSQL database service not being started
Because the disk on the customer's side is generally the FAT32 file system, when installing the program, we use manual installation of PostgreSQL to install the database, but after the initialization of the database group is successful and the system service is successfully registered,
I found that the PostgreSQL service cannot be started, and the service was started and stopped. Then I found that the error reported in the system time viewer is: Could not create inherited socket, the error code is 10022
Solution:
Run netsh winsock reset, restart the computer, OK!
The above is personal experience. I hope you can give you a reference and I hope you can support me more. If there are any mistakes or no complete considerations, I would like to give you advice.