Toblog

1. v. The act of writing a weblog or 2. n. Toby’s weblog.

Upgrade completed

Well, that upgrade seems to have been completed OK with a couple of issues: I had a couple of glitches one of which was to do with the rails backup of my database – fixed by turning off the backup stage in the rails installer. There was also an issue with my tags: I’ve known that my tags caused problems in the past with my use of the full stop. In the new typo it causes major problems so I wrote a quick script to replace full stops with underscores. Hopefully all is well now!

Published on 2008/07/22 at 17:19 by Toby, tags ,

We're back!

After a couple of days of pain toblog is back, and it wasn’t the typo upgrade that caused the problem.

A few months ago gentoo removed a patch to their postgresql build. Unfortunately the removal of this patch caused a problem which meant that pretty much any query on the structure of the database returned:

ERROR: did not find ‘}’ at end of input node

This is not good.

I found someone who suggested some database surgery online but this only partly solved the problem. So, having partially updated typo because the upgrade requires structural queries to work, I finally took the plunge and did what was ultimately necessary.

  1. Alert clients to a database / mail outage overnight
  2. Stop the database
  3. Take a backup of the data directory
  4. Downgrade postgresql to the version with the pg-heir patch
  5. Startup postgresql and undo the surgery performed above
  6. Dump all the databases to file using pg_dump -Fc
  7. Stop postgresql
  8. Upgrade postgresql
  9. Remove the old data directory
  10. Reinitialise the postgres database
  11. Start postgresql
  12. Create the required users
  13. Create the required databases
  14. Import all the databases from the files dumped above

This took a good couple of hours, and pg_restore does take a lot longer than pg_dump. That said I now have a properly set up postgresql install that I am happy with and understand a lot more so some good has come from this exercise.

Bring on the 8.2.x upgrade!

Published on 2007/04/04 at 14:54 by Toby, tags , ,

Powered by Publify – Thème Frédéric de Villamil | Photo Glenn