I’ve been using Postgres db server for years in my day job. And for all those years I had a third party server installed on my Mac. But since Apple started bundling Postgres in Os X system I was thinking of ways to start using that one. Unfortunately it seems that Apple decided to make using it as hard as it’s possible so getting it to work needed some hacking.

The application I’m working with accesses db via network connection on localhost. So I needed to turn on listening on network interfaces. Postgres keeps it’s config file in /Library/Server/PostgreSQL/Data folder. You can find postgres.conf there. You need to edit this file and change two lines to show this:

changes that and now my application can access built in Postgres server on localhost.

But how about command line tools? Apple sets things up in a way that Postgres accepts socket connection only from users that belong to _postgres group. Now I needed to add myself to that group using dseditgroup command:

# sudo dseditgroup -o edit -a usertoaddtogroup -t user _postgres

and voila! I’ve gut running instance of Postgres (9.1.5) accepting connection from my application and letting me use all command line tools.

First things first, I needed to put two drives in my Mac. I already had Crucial M4 SSD and 500GB HDD so I bought hard drive caddy and put my 500GB Momentus XT in it:

Here you can see both my SSD and HDD installed in late 2010 unibody MacBook Pro:

That was the easy part. Now how to make them work? I Jinx’s article you can read that GUI Disk Util does not offer needed functionality. It’s available only in command line version. But from my previous installation I remembered that there is acces to terminal in Os X recovery mode:

It was downhill from there. Create Logical Volume Group:

get UUID:

Create volume:

As you can see Os X Installation recognized such volume:

and installed nicely. After the whole process was over I’ve done similar to Jinx’s tests and the drive indeed behaves like fusion – more often used files end up on the SSD and less needed are being shuffled to the HDD.

Also it seems that upgrade removed zend user:sudo /usr/local/zend/bin/zendctl.sh restart
id: zend: no such user
id: zend: no such user
id: zend: no such user
id: zend: no such user
id: zend: no such user
id: zend: no such user
id: zend: no such user
id: zend: no such user
id: zend: no such user
id: zend: no such user
zdd is not running

Today when I woke up my MacBook greeted me with very unpleasant alert:

The network backup disk does not support the required AFP features.

It turnes out that during the upgrade to Lion Apple used their newest set of commands that were not compatible with stable netatalk package in Ubuntu.
To get my network storage to work again I had to upgrade to the latest netatalk 2.2.beta4.

I’ve chosen to keep old version of configuration files, the only notable difference was that now afpd.conf lists -tcp -noddp options as defaults. I added them to my list. Quick restart of netatalk daemon and voila – Time Machine works again.