Troubles with creating initial PostgreSQL base I'm trying to create a new base /usr/pgsql/bin/initdb -D /var/lib/pgsql/data --locale=en_USand got the following:  

creating template1 database in /var/lib/pgsql/data/base/1 ... FATAL:  could not create shared memory segment: Invalid argument
DETAIL:  Failed system call was shmget(key=1, size=35233792, 03600).
... To reduce the request size (currently 35233792 bytes), reduce PostgreSQL's shared_buffers parameter (currently 3584) and/or its max_connections parameter (currently 104).
If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for


How to fix this? Where can I change these SHMMAX and SHMIN? Do I really need to recompile the linux kernel as PostgreSQL advises me?
As the root user, edit /etc/sysctl.conf and add the following lines:

kernel.shmmax=2147483648
kernel.shmall=2097152


Then run:

sysctl -p


.. to reload the kernel settings.

That'll set the maximum shared memory segment size to 2Gb &amp; should solve your issue.