Fixing PostgreSQL Services With Clean Install

I recently could not restart a stopped PostgreSQL server on Fedora 7. For some reason the server stopped and would not restart. I tried uninstalling and reinstalling Postgres and had the same problems.

I then renamed the data folder (/var/lib/pgsql), reinstalled Posgres, and was able to start the service. A corrupt database or table may have been causing the errors that prevented the database services from starting.

You would think that uninstalling an application and then installing it would fix these types of problems, but in this case it didn’t. A clean uninstall should include deleting all data files that the application created. This is something that the Postgres team should consider.