I recently upgraded my mid 2009 Macbook Pro with double the ram (8gb) and a new SSD. After I restored my machine via backup from Time Machine, I was running into an issue trying to start Postgres up.
This is what showed up in the log:
LOG: database system was interrupted; last known up at 2012-06-14 11:55:12 PDT
LOG: unexpected pageaddr 0/2BBE000 in log file 0, segment 4, offset 12312576
LOG: invalid primary checkpoint record
LOG: invalid secondary checkpoint record
PANIC: could not locate a valid checkpoint record
LOG: startup process (PID 2753) was terminated by signal 6: Abort trap
LOG: aborting startup due to startup process failure
After a quick googling, turns out all you need to do to fix this is reset the transaction log. Since this is just my development machine and the data doesn’t matter too much to me, I have no problems forcing a reset. This can be accomplished with pg_resetxlog.
pg_resetxlog -f /usr/local/var/postgres
Brontesaurus

