How to configure postgresql in Lion I am new in mac os. I was trying to install Postgresql. Before i did not know there is a Postgresql already available with default installation. So, I downloaded Postgresql 8.4 and installed it. I changed the configuration as the instruction. 

[sudo vi /etc/sysctl.conf]

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



I changed kern.sysv.shmall=33554432 and saved it. Then whenever I installed the postgresql 8.4 it shows an error. Now I do not know is it already installed or not? How can I check it?
After that, I found some command and execute those. But I do not know how to fix it?

Shahjalals-MacBook-Pro:~ shahjalal$ which psql
/usr/bin/psql

Shahjalals-MacBook-Pro:~ shahjalal$ psql
dyld: Library not loaded: /usr/lib/libpq.5.dylib
  Referenced from: /usr/bin/psql
  Reason: no suitable image found.  Did find:
    /usr/lib/libpq.5.dylib: no matching architecture in universal wrapper
    /usr/lib/libpq.5.dylib: no matching architecture in universal wrapper
Trace/BPT trap: 5

Shahjalals-MacBook-Pro:~ shahjalal$
Is there any gui interface to access postgresql? If Yes then how can i access it? I have a plan to install Postgis and PgRouting package in my PostgreSQL for one of my project.
First up, what's the error you're getting, and how are you getting it? Are you trying to re-run the installer?

In answer to two, take a look at http://www.jonathandean.com/2011/08/postgresql-8-4-on-mac-os-x-10-7-lion/ who seems to have gotten it sorted.

There absolutely is a GUI for PostgreSQL, it's called pgAdmin 3 (or pgAdmin III). If you successfully installed the OS X version of PostgreSQL from their site, then you should already have it (take a peek in Launchpad). If it's not there, you can get it at http://www.pgadmin.org/ but read the downloads page carefully---it isn't well sorted and the most up-to-date version is in the middle of the list.

As EmmEff said, in future Homebrew or MacPorts might be easier (especially if you like playing around!) since you can wipe the install cleanly.