20 January 2011

PostgreSQL Cannot Start DB Service

Postgres cannot be started up, a file in pg_xlog was deleted, filename 000000010000000100000077

Err shown in $PGDATA/pg_log

2010-12-30 15:59:04 MYT LOG: database system was interrupted; last known up at 2010-12-30 12:19:37 MYT
2010-12-30 15:59:04 MYT LOG: could not open file "pg_xlog/000000010000000100000077" (log file 1, segment 119): No such file or directory
2010-12-30 15:59:04 MYT LOG: invalid primary checkpoint record
2010-12-30 15:59:04 MYT LOG: could not open file "pg_xlog/000000010000000100000077" (log file 1, segment 119): No such file or directory
2010-12-30 15:59:04 MYT LOG: invalid secondary checkpoint record
2010-12-30 15:59:04 MYT PANIC: could not locate a valid checkpoint record
2010-12-30 15:59:04 MYT LOG: startup process (PID 15605) was terminated by signal 6: Aborted
2010-12-30 15:59:04 MYT LOG: aborting startup due to startup process failure


Solution:
/opt/Postgresql/8.4/bin/pg_resetxlog -f $PGDATA

No comments:

APACHE - failed to start

[On] Red Hat Enterprise Linux Server release 7.4 (Maipo) Apache was not running and attempt to start the httpd service failed. The natural t...