I turned the archive_mode on on my postgresql configuration for testing a backup server . And since the wal files took lots of disk space, after my test I turned it off and also deleted the wal files. When I tried to restart postgresql I got the following error.
root@hooshang:/etc/postgresql/9.1/main# /etc/init.d/postgresql restart
* Restarting PostgreSQL 9.1 database server
* The PostgreSQL server failed to start. Please check the log output:
2014-10-16 13:15:28 IRST LOG: database system was shut down at 2014-10-15 15:51:53 IRST
2014-10-16 13:15:28 IRST LOG: could not open file "pg_xlog/00000001000007DC00000037" (log file 2012, segment 55): No such file or directory
2014-10-16 13:15:28 IRST LOG: invalid primary checkpoint record
2014-10-16 13:15:28 IRST LOG: could not open file "pg_xlog/00000001000007DC00000029" (log file 2012, segment 41): No such file or directory
2014-10-16 13:15:28 IRST LOG: invalid secondary checkpoint record
2014-10-16 13:15:28 IRST PANIC: could not locate a valid checkpoint record
2014-10-16 13:15:28 IRST LOG: startup process (PID 17467) was terminated by signal 6: Aborted
2014-10-16 13:15:28 IRST LOG: aborting startup due to startup process failure
How can I fix this issue?