upgrading to postgresql 8.3 on gentoo
July 31st, 2008
When I initially built my primary server, the latest stable postgresql package was 8.0.x. At this time that same tree is still marked as stable. I'm sure that this is largely due to the overall postgresql upgrade philosophy, which involves dumping (backing up) all your dbs and the restoring them after the upgrade. Since that isn't a seamless process, I'm sure they want an upgrade to be a conscious decision. That being said, the current upgrade path involves switching from the dev-db/postgresql package to the dev-db/postgresql-base/dev-db/postgresql-server packages.
Many thanks to @dberkholz for pointing me at the package maintainer's blog (which doesn't come up when searching google due to the large number of portage search/info listings). Here's what I ended up doing:
pg_dumpall > /tmp/please_work.dump/etc/init.d/postgresql stop && emerge unmerge libpq postgresecho "dev-db/postgresql-base ~amd64" >> /etc/portage/package.keywords echo "dev-db/postgresql-server ~amd64" >> /etc/portage/package.keywords echo "virtual/postgresql-server ~amd64" >> /etc/portage/package.keywords echo "virtual/postgresql-base ~amd64" >> /etc/portage/package.keywords
emerge -uD postgresql-base postgresql-serveremerge --config "=dev-db/postgresql-server-8.3.3"rc-update add postgresql-8.3 default
pg_restore to reload all your data. I had some grants fail, so I needed to redo them manually. So far so good, the db seems to be a bit faster and less resource hungry. I may post the rrd graphs from cacti later, but there is a noticeable difference.osx software suggestions
July 24th, 2008
A while back (2003) I borrowed an iBook from a friend who was looking to sell it. Since then I've used Mac laptops for my personal development (and commercial where possible). With every major rev of the OS the common tools I use changes slightly. A few friends of mine have recently bought Apple laptops and have asked about what they should try out. Those questions have inspired this list. So without any more preface here is my list of must have apps and tools for Leopard:
- Quicksilver - my favorite launcher (think slickrun but better)
- Bezel Pro QuickSilver interface - Makes Quicksilver match some Leopard UI elements
- Adium - The best chat client for OSX. Supports multiple protocols and a host of great features. Including chat encryption and logging.
- Perian - Effectively ffdshow for OSX. Providing a large number of codecs for the native quicktime media player.
- VLC - Cross platform. Plays everything media player.
- Developer Tools - I think this is self explanatory.
- MacPorts - Almost every piece of free software that I use is covered by MacPorts.
sudo port install ruby - The Unarchiver - Think 7zip for osx. It's free and has handled every archive I've thrown at it.
- Handbreak - DVD Ripper
- Aquamacs - Emacs gone Mac (I generally use vim, but I like to have emacs around in case I need to play sokoban.)
- MacVim - Vim with some Mac flair
- VMWare Fusion - I do .net dev and cross platform testing with this. It's key and at the price point a steal. I prefer it over Parallels because the vmware player is free and the vm's are cross platform so if anything goes wrong I can just fire up my image on another machine.
- Fugu - Simple and Free sftp.
- OmniGraffle - Like Visio only pretty.
- Little Snitch - I like to know when my machine decides to "talk" to another one.
- Xee - A lightweight image viewer. The closest thing I could find to the windows quickview stuff. Apple Preview doesn't iterate over folders.
- svnX - For those times when I want to use a GUI subversion client. Incidentally those times are becoming rarer and rarer, mainly due to git.
- iStat Pro - It's nice to see system stats at a glance in dashboard
- Dashalytics - I'm addicted to stats.
- TextMate - A very nice text editor
Most of my development is done using Vim in a terminal. Although I've recently been using TextMate a good bit. I tend to use macports for everything, ruby and python development included. Primarily because I've found it easy to maintain and upgrade using the macports installed versions. It's worth noting that the macport for ruby is currently unstable in my opinion, due to their upgrading to ruby 1.8.7.
There you have it, please add your own amendments in the comments.
subversion 1.5 and unexpected format errors with blank info
July 22nd, 2008
We use subversion at work, subversion 1.5 specifically. I was working on a project with a lot of externals and ran into the following error:
Unrecognized format for the relative external URL '' .Boy is that informative. After poking around and doing all sorts of re-organization of the externals I noticed that I had a dupe. Removing the duplicate external solved the problem. Hope that helps.mail issue with iphone software 2.0 and jailbroken phone
July 10th, 2008
Until a recently my phone was jailbroken, in order to run apps like Twinkle and Go. Earlier today I upgraded to the leaked 2.0 firmware. The upgrade itself went without a hitch, and everything seemed to be working. That is until I tried to start the Mail app. It immediately closed. It seemed like Mail was crashing due to permissions or settings. Here are the steps I tried that failed:
- Disabling the account
- Deleting the account
- Re-upgrading the phone
- Running Setting Reset on the phone
- Running Full Reset on the phone
- Attempting to downgrade to 1.1.4 (the downgrade failed every time)
Here's what worked:
- Re-upgrade the phone. don't restore from a back up or select setup new, yet
- open Terminal.app
cd ~/Application Support/MobileSync/Backup cd <newest folder here> grep Accounts *|cut -d' ' -f |xargs rm
- Reconnect the phone and restore the backup you just messed with
git lost-found and no branch
June 30th, 2008
After a little hacking session and some unpleasant ruby 1.8.6 vs 1.8.7 fun, I ran into another interesting tidbit about git. As with most powerful tools it will gladly allow you to blast your foot off. Wouldn't ya know, my aim was well aligned with my feet a few moments ago. git checkout some/remote_branch. I thought I was switching over to a remote branch I'd created on another machine, so that I could test and work on this other machine. Little did I know that I had entered the "(no branch)" state. At this point I was pretty much gunning to create orphaned blobs, commits and other such items. After creating a few, I wanted to push those changes to the upstream server (github in this case) after merging them into the HEAD.
After checking out the master branch, I quickly found out that my little "(no branch)" wasn't reachable. A little poking around git rendered, git fsck --lost-found, which will identify orphaned commits and entities. Once you find the commit id you can checkout the master branch again and git merge my-lost-commit-id.