Thread: PostgreSQL unable to start on Mac OS X

PostgreSQL unable to start on Mac OS X

From
agoetz@mac.com (Andrew Goetz)
Date:
Dear all,

I have installed PostgreSQL on my company's iMac OS X server (not my
choice, but you use what you've got), via Marc Liyanage's directions.
(Thanks Marc!  http://www.entropy.ch/software/macosx/postgresql/)  It
worked well for several months until it knew that I would be out of
the country.  While I was gone, it stopped working.  One of our
workers kindly tried to reboot the machine, and postgres was never
able to start again.

Upon my return, I tried unsuccessfully to restart postmaster.  It
would always say that postmaster started successfully, but then
nothing would happen.  The logfile contained this message:

DEBUG:  database system was shut down at 2003-02-26 01:19:59 GMT
FATAL 2:  open of /usr/local/pgsql/data/pg_xlog/0000000000000000 (log
file 0, segment 0) failed: Permission denied
DEBUG:  startup process (pid 485) exited with exit code 2
DEBUG:  aborting startup due to startup process failure

In my finite wisdom, I tried to change the permissions on the file
with all the zeros.  I got the same response from postmaster, but the
logfile contained a different message:

DEBUG:  database system was shut down at 2003-02-26 01:19:59 GMT
DEBUG:  ReadRecord: read of log file 0, segment 0, offset 9494528
failed: No such file or directory
DEBUG:  invalid primary checkpoint record
DEBUG:  ReadRecord: read of log file 0, segment 0, offset 9494528
failed: No such file or directory
DEBUG:  invalid secondary checkpoint record
FATAL 2:  unable to locate a valid checkpoint record
DEBUG:  startup process (pid 726) exited with exit code 2
DEBUG:  aborting startup due to startup process failure

I searched this group, and it seems that others have had this problem,
but the answer is to run some programs that I cannot find under a
contrib/ directory which I do not have.  I suspect that this is
because I did not compile from source.

Being very new to postgreSQL, and databases, servers, and *nix in
general, I have now used up all my knowledge.  If anyone would take
pity on me and tell me whether they believe any of this data is
recoverable and how I might accomplish such a feat, I would apreciate
the help.

Thanks,
Andrew