Comment 15 for bug 235379

Revision history for this message
Michael Lustfield (michaellustfield) wrote : Re: PostgreSQL 8.3 server package very incomplete (missing all of /var/lib/postgresql/8.3)

NOTE: Take my advice with a grain of salt. I'm just trying to use the general template that I use to get back to a clean slate.

I've been reviewing this bug some more and I think the summary should be changed.

It appears that your issue is not with an incomplete package, but rather a broken installation.

Be sure to backup or databases appropriately. I have little experience in postgresql so I am resorting to generic trouble shooting skills.

The first step is definitely to backup your data. [1]

Remove all pqsl data.

sudo aptitude purge cl-sql-postgresql odbc-postgresql postgresql postgresql-8.3 postgresql-common
sudo aptitude clean #This gives you a clean download slate
 * Delete all users that were created from psql as well as their data

# Do a dry run to know what you find
sudo find / -name postgresql
sudo find / -name pgsql
sudo find / -name psql

# Delete it provided you have a good backup
sudo find / -name postgresql -exec rm -Rf {} \;
sudo find / -name pgsql -exec rm -Rf {} \;
sudo find / -name psql -exec rm -Rf {} \;

Reinstall things
sudo aptitude install postgresql-8.3 postgresql-client-8.3

Finally, restore your data. [1]

[1] - http://www.postgresql.org/docs/8.1/interactive/backup.html