h1ghlevelb1ts

Bits and pieces

A few quick notes before heading of into vacation.

Postgres

Ever seen this or a similar error message on your Mac?

could not create shared memory segment: Invalid argument  

This happened to me when I tried to increase the number of max_connections parameter in the postgres configuration file. After increasing the maximum connections I got another error message which told me to increase the shared_buffers size as well. And finally, after that I got the error message above. After some research I found out that for some reason the system shared memory value on Mac OS X is out of historic reasons very low. Go figure.

The thing to do is to edit /etc/sysctl.conf and add something like this:

kern.sysv.shmmax=524288000
kern.sysv.shmmin=1
kern.sysv.shmmni=64
kern.sysv.shmseg=16
kern.sysv.semmns=130
kern.sysv.shmall=131072000
kern.sysv.maxproc=2048
kern.maxprocperuid=512

The parameter which is important is kern.sysv.shmmax. You can view the current setting via sysctl -A or more specifically sysctl kern.sysv.shmmax. I had to restart my computer to get the values to take effect.

Git

I started to use git more and I must say it is growing on me. However, since most of the projects I am working with are still on svn I have to use git-svn. Most of the time everything works just fine, but one thing I am looking for is a tool which converts a git patch to a svn patch. Unfortunately, a git patch will not directly apply into a svn repo. Problematic are especially file additions and removals. So far I haven't found a satisfactory solution. Anyone?

RubyGem

I thought I pass on this cool little ruby gem I found and started using - Cheat Sheets. Just install it via sudo gem install cheat and then you can access any of the built-in cheat sheets, for example cheat git. And of course you can simple add your own cheat sheets. Sweet.

Android

More of a question really. Does you Android phone shuts down properly? I had several occasions now where my phone shut down, because it was running out of power (well, we all know how great the battery life time is :( ). In each case I had to pull out the battery in the end, because the shutdown would never complete. Does anyone have similar experiences?

--Enjoy

comments powered by Disqus