Forum OpenACS Q&A: Response to postgresql vacuum analyze problem

Posted by Robert Ezman on
The only thing that worries me even more than vaccum not working is that when I tried to do the pg_dump / drop db /createdb / restore, the restore failed.

I can't remember the exact error message but it had to do with a table missing followed by '/N' invalid command a few times.

Luckily I had stopped the database , backed up the database files and then restarted.  So I was able to go back to what I had before.  When I did a pg_dump with a -d (do proper sql inserts instead of reading from std in) it didn't fail. I mean the dump/ restore succeded.  But my system seemed to be unstable.  I got intermittent error messages from openacs saying that it couldn't connect to the db. (I had also tried the vacuum analyse which had crashed so maybe that was the cause of the instability)

One dumb question too:  In the postresql documentation when they talk about backing up and restoring they say use pg_dump to backup and psql db < dbfile to restore.  I'm assuming there's a drop db and createdb in the middle.  Am I right?  I mean you can't just load the dumped file in on a db that already has the info because you'll get a ton of errors.