You've got it completely wrong. By setting shared_buffers to 2GB it means no-one can use it. It's not postgres that's running out of memory, it's the rest of your system. Set it to something sane like 128MB or maybe smaller.
Isn't 128MB quite low considering the "current standard" of 25% - 50% of total ram?