Archive for April, 2007

In the cooking mood

Wednesday, April 25th, 2007

So as mentioned in our weekly meeting, I’ve been watching a number of food blogs and starting to try a few. Here are two that were quite tasty yet easy:

labaniyya - chicken in yogurt sauce - this was a simple but nice flavour, on wild rice.

and

chorizo, lentils and chickpea soup - super tasty, filling.

No thought leadership there Trevor, but I think this is even better :)

Sailing, half-Pathed

Thursday, April 19th, 2007

Not an official 2Paths event, but there was plenty of Pathian presence onboard the J24 “Now” at the Royal Vancouver Yacht Club regatta on the weekend. Gord and Trevor are genuine members of the tribe. Nigel, 2Paths espresso guru, skippered his first regatta in the boat. We could give Nigel .5 rating for his coffee contribution, and let’s give him a nominal .25 rating for being offspring of a genuine 2Pather. Then there’s Nicki, who, as girlfriend of Nigel, could rate a .125 of a 2Pather, while Rebecca, as a wife of, should rate no less than a .25, yielding an easy half-Path score for participation.

Nicki, Rebecca, Gord, Nigel
Nicki, Rebecca, Gord and Nigel on Sunday

There’s no time for photo opportunities during racing, but we had time to relax and share stories between races.

Gord and Nigel
Gord relieves Nigel at the helm
Gord
Gord on Saturday

To complete the team photos, here’s the photographers finger, showing the sacrifices made on the otherwise wonderful weekend.

Team sacrifice
Trevor’s sacrifice

A North Carolina PostgreSQL Adventure

Wednesday, April 4th, 2007

I recently attended a PostgreSQL Administration Course put on by the Open Technology Group in Morrisville NC. The course was excellent, covering a wide range of administrative PG tasks, and I learned lots of tricks and gotchas that I wish I knew many years ago when I first started using postgres.

Chander Ganesan
Our Instructor Chander Ganesan

The course was taught by Chander Ganesan who really knew his stuff. The pace of the class was very good, and Chander took lots of time to answer all our questions. There were 12 of us in the class, spanning a wide range of occupations, industries, and geographical locations, but we all seemed to have similar experience levels in postgres which made the class go very smoothly. I of course was the only Canadian, but at least I was not the only female as is often the case for me in the programming world!

Kurt and Jacob came from the Java world in Utah, working for Smile Reminder, a software solution for reminding patients of dentists appointments. Then there were Shane and David from Minnesota who work for the Metropolitan Airports Commission, where their mandate pertains to air traffic noise levels in the community. They felt right at home at our strange little microcosm by the Raleigh/Durham airport, with airplanes zooming overhead all day (and night) long, and kept us informed as to the appropriate noise levels we should be tolerating. There was a smattering of other states represented: Massachusetts, Florida, and even someone from Fargo North Dakota. It seemed like most of us were Java Developers, but there was at least one Python Developer in the mix too.

PostgreSQL Administration Course Students
Fellow Students (Kurt, Scott, Jacob) in front of our classroom

I’ve written another blog that covers the actual content of the course, so I thought I’d talk instead about our stay in North Carolina. Almost all of us had chosen the all-inclusive option, so the glorious Microtel Inn (with their Micro rooms) would be our home for the week. This was across from an eerily abandoned outlet mall that we endearingly referred to as “The Mall of the Dead”. We went on many dining expeditions, attempting to find culinary options other than Quiznos, Taco Bell, and the convenience store at the Mobil (which, incidentally, is where I dined my first night). The two gems that were my stomach’s saving grace were a great Indian restaurant, and Carmen’s, a really good and oddly out of place Cuban restaurant, yum!

Lunch at Carmen's
Lunch at Carmen’s

We soon discovered that North Carolina hasn’t yet tuned in to the wonderful invention called The Sidewalk. Well, actually, it seemed more like they had heard of them but didn’t understand their true purpose. As we trudged down the side of the highway in pursuit of a phantom movie theatre and restaurant district we had heard of, we would walk on perhaps a 20 foot chunk of sidewalk that would then abruptly turn into grassy overgrown garbage-filled bushwacking, and then nothing passable where we would have to risk our lives stepping onto the highway. But then we would come to intersections and there would be another 20 foot chunk of sidewalk just on the corner, coming from nowhere, and leading to nowhere complete with TWO wheelchair ramps. We wouldn’t want all those wheelchair users having to jump down the curb after 4×4ing through the bush now would we? We would want them to safely roll into the highway traffic instead!

Sidewalk to Nowhere
Sidewalk to Nowhere
Wheelchair Accessible Sidewalk
Wheelchair Accessible Sidewalk

On this particular adventure we were misinformed by Google maps as to the real location of the movie theatre, for when we arrived at a gas station 2 miles later (that according to Google maps was actually a movie theatre), we were informed by the friendly man at the counter that the movie theatre was still another 4 miles. Incidentally, before you trust Google’s directions, make sure your address isn’t truncated in the results. In this case, reversing the to and from addresses produced the correct results, but without reversing one address got truncated. Shame on you Google! We gave up on the movie and headed back, suburban bushwacking our way back to the hotel. The next night we got a little smarter and actually took a cab to a movie theatre, where all the guys saw 300, and I saw Black Snake Moan. Here I was, clear across the nation (in a different nation for that matter), and it was very 2Paths-like: all the guys wanting to see a movie all about death and killing, and me being the odd woman out!

Well, the course came to an end on Friday, just as a big storm hit the northeastern states. This of course interfered with a lot of flights, and one unfortunate classmate was informed he wouldn’t be flying out until Sunday. I crossed my fingers and hoped for the best, but no luck. My first flight to Chicago was quite delayed so my connecting flight to Vancouver left without me. That meant a motel in Chicago without my bag and a flight back home in the morning, which is where I sit right now, writing this.

It’s too bad - I would have loved to check out part of North Carolina, and also Chicago, but my only impression of these places is from my experience staying in motels near the airport, which doesn’t really reflect the true culture of the areas. At least, I’m assuming it doesn’t!

I’d totally recommend a class with the Open Technology Group. Perhaps in the future we could arrange to get Chander out to Vancouver. We have lots of sidewalks here!

PostgreSQL Administration Course, Morrisville, NC, March 2007

Wednesday, April 4th, 2007

In mid-March I attended a PostgreSQL Administration Course put on by the Open Technology Group http://www.otg-nc.com in Morrisville NC. Our instructor Chander Ganesan took us through the full gamut of PostgreSQL administration and configuration, from manual installation to performance tuning to third-party replication tools. Our course covered items such as secure access, user management, schemas, tablespaces, backup and recovery, triggers, and query plan analysis.

Chander Ganesan
Our Instructor Chander Ganesan

If I wasn’t already convinced of the necessity to migrate from PostgreSQL 7.4 to 8.x, this course certainly drove that point home. Many of the performance tuning configuration variables we delved into are not even available in 7.4. One fellow classmate noted a 25% increase in database performance after migrating to 8.x in their workplace. I will cover Postgres Configuration & Performance Tuning more in-depth in a future blog.

Performance aside, 8.x offers a lot of other improvements from 7.4. One thing I especially like is the ability to write functions with dollar-quoting instead of single-quoting which is the only option in 7.4. I’ve needed to write a lot of complicated PL/pgSQL functions, so this makes things a lot less of a pain.

In the course I learned lots of tricks and tips that I wish I knew long ago, such as the psql meta-commands \timing (logs all statement duration times to the client), \x (toggles expanded display), and \e (opens a vi editor for your query). I also learned that views can be mutable by placing rules on them that mutate the underlying tables. This is especially useful for restricting write access of specific table columns, or customizing write access to specific users.

The course also covered backups and replication. I found the point in time recovery section very useful. We also did an exercise of installing and configuring Slony for replication, which our company is now considering as an option. I will cover these topics more in-depth in a future blog.

Chander was extremely knowledgeable and very helpful in answering the multitude of questions we threw his way. The class size (12) gave the right balance between personal attention and good class discussions. The subject matter of the course was very relevant to the work we do here at 2Paths, and my training has been a catalyst in getting an action plan into place for our company-wide database version migration and performance tuning standards. I would highly recommend this course, and would also consider taking the advanced PostgreSQL Performance Tuning course as a follow-up.

Future Blog Installments:

  • Database Backup, Recovery and Replication
  • Postgres Configuration & Performance Tuning