Re: initdb problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello people,

Fixing the postgres user's home may have been an
improvement, but now I get problems with the shared memory
segment:

acorn$ sudo su postgres -c 'initdb -D
/Library/PostgreSQL8/data'
Password:
The files belonging to this database system will be owned by
user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.

fixing permissions on existing directory
/Library/PostgreSQL8/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers/max_fsm_pages ...
400kB/20000
creating configuration files ... ok
creating template1 database in
/Library/PostgreSQL8/data/base/1 ... FATAL:  could not
create shared memory segment: Cannot allocate memory
DETAIL:  Failed system call was shmget(key=2, size=1646592,
03600).
HINT:  This error usually means that PostgreSQL's request
for a shared memory segment exceeded available memory or
swap space. To reduce the request size (currently 1646592
bytes), reduce PostgreSQL's shared_buffers parameter
(currently 50) and/or its max_connections parameter
(currently 10).
        The PostgreSQL documentation contains more
information about shared memory configuration.
child process exited with exit code 1
initdb: removing contents of data directory
"/Library/PostgreSQL8/data"

The pg docs suggest:

In OS X 10.3.9 and later, instead of editing /etc/rc  you
may create a file named /etc/sysctl.conf, containing
variable assignments such as

kern.sysv.shmmax=4194304
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.sysv.shmall=1024

This method is better than editing /etc/rc because your
changes will be preserved across system updates. Note that
all five shared-memory parameters must be set in
/etc/sysctl.conf, else the values will be ignored.

Beware that recent releases of OS X ignore attempts to set
SHMMAX to a value that isn't an exact multiple of 4096.

SHMALL is measured in 4 kB pages on this platform.

In all OS X versions, you'll need to reboot to make changes
in the shared memory parameters take effect.

----

Unfortunately, I got the above error (again) with the initdb
command after creating the /etc/sysctl.conf file, using the
values suggested above, and then rebooting.

Any suggestions?

Cheers!

Joe


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux