Monthly Archives: December 2008

Shared memory fix for PostgreSQL Mac installation

EnterpriseDB have kindly created a one-click installer for PostgreSQL, but unfortunately it doesn’t work out-of-the-box, at least not on my MacBook Pro. The problem is down to the amount of shared memory that is configured in OS X; by default it is 4Mb, and PostgreSQL requires 32Mb:

Postgres installer error

The error message suggests looking at the README file, which actually doesn’t exist. Luckily, there’s a simple fix; to increase the shared memory to the required 32Mb, create or edit the /etc/sysctl.conf file and include the following lines:

kern.sysv.shmall=8192
kern.sysv.shmseg=64
kern.sysv.shmmni=256
kern.sysv.shmmin=1
kern.sysv.shmmax=33554432

Reboot your machine for the settings to take effect, and re-launch the PostgreSQL installer which should now work as normal.

Glen Scott

I’m a freelance software developer with 18 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork. I am the Managing Director of Yellow Square Development.

More Posts

Follow Me:
TwitterFacebookLinkedIn

Installing Subversion 1.5 on Mac OS X

My current project at Yahoo! is using a Subversion repository for version control, as opposed to the usual CVS (thankfully). Unfortunately, it turns out that the svn client installed on Mac OS X Leopard up to and including 10.5.6, is 1.4 whereas the “best” release is 1.5.

It’s very simple to get the newer 1.5 version up and running by compiling from source:

This will install Subversion 1.5 in your /usr/local path.

I added the --without-sasl option to prevent the following error from occurring when committing files:

svn: Commit failed (details follow):
svn: Cannot negotiate authentication mechanism

Glen Scott

I’m a freelance software developer with 18 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork. I am the Managing Director of Yellow Square Development.

More Posts

Follow Me:
TwitterFacebookLinkedIn

Closures in PHP 5.3

A good article from IBM’s developerWorks on the new functional programming features in the upcoming release of PHP 5.3:

What’s new in PHP V5.3, Part 2: Closures and lambda functions

Glen Scott

I’m a freelance software developer with 18 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork. I am the Managing Director of Yellow Square Development.

More Posts

Follow Me:
TwitterFacebookLinkedIn

The problem with complex error messages

Whilst I found myself agreeing with most of Jeff Atwood’s post The Problem With Logging, I strongly disagree with his third point:

If it’s worth saving to a logfile, it’s worth showing in the user interface. This is the paradox: if the information you’re logging is at all valuable, it deserves to be surfaced in the application itself, not buried in an anonymous logfile somewhere. Even if it’s just for administrators. Logfiles are all too often where useful data goes to die, alone, unloved and ignored.

This fails to take into consideration the two very distinct types of error messages that an application should have: administrator focused and user focused. Both of these error messages can be triggered by the same error condition. A problem occurs when you display administrator focused messages to the user: anyone that has come across largely meaningless error codes rather than a friendly human-readable language has experienced this less-than-valuable approach to logging.

useless error mesage

Good error messages are essential to any application, and so are adminstrator focused messages, but let’s remember these are two very distinct features and need to be separated as necessary.

Glen Scott

I’m a freelance software developer with 18 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork. I am the Managing Director of Yellow Square Development.

More Posts

Follow Me:
TwitterFacebookLinkedIn

Sun and MySQL continue uneasy relationship

As well as moving away from a completely open model, Sun’s MySQL has bigger issues:

Sun has announced the official release of MySQL 5.1, a new version of the popular open source database software. Although Sun has declared that this version is ready for widespread adoption in production environments, MySQL creator Michael Widenius says that it has “fatal bugs” that seriously undermine the quality of the release.

MySQL creator: version 5.1 released with “fatal bugs”

Glen Scott

I’m a freelance software developer with 18 years’ professional experience in web development. I specialise in creating tailor-made, web-based systems that can help your business run like clockwork. I am the Managing Director of Yellow Square Development.

More Posts

Follow Me:
TwitterFacebookLinkedIn