[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] PostgreSQL Problems



Yeeha!

Fixed the corrupted PostgreSQL database.  Somehow during a reboot process
the PostgreSQL pg_control file was corrupted and the postgresql server could
not restart.  The errors that were generated read, "FATAL 2: Control file
context is broken."  The problem was resolved by deleting the corrupted file
and data structure, creating a new data structure in the same location, and
restoring all of the cobalt site and user data into the database using the
meta-verify script.  Just in case anyone else has this problem, I figured
I'd share the steps I took to resolve it.

- Logged in as root
- Backed up all data in /var/lib/pgsql/data (just in case)
- Deleted all content under /var/lib/pgsql/data
- Switched to postgres user (# su postgres)
- Executed the PostgreSQL initdb command to initiate a fresh data structure
in the same location: # initdb -D /var/lib/pgsql/data
- Switched back to root
- Started PostgreSQL server: # /etc/rc.d/init.d/postgresql start
- Used the cobalt meta-verify script to reinstate the data in the database:
# cd /usr/local/sbin
# ./meta-verify -si
Answer yes to all questions
#./meta-verify -sa
Answer yes to all questions
#./meta-verify -ui
Answer yes to all questions
 #./meta-verify -ua
Answer yes to all questions
# /usr/local/sbin/swatch

Thanks to those who helped! :)

Andrew