I'm trying to create a new base /usr/pgsql/bin/initdb -D /var/lib/pgsql/data --locale=en_US
and 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?