pkgsrc-Users archive

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

postgresql 18 and shm



I just tried to upgrade my postgresql 17 database to 18. (NetBSD-11.99.6/amd64)

run postgresql17
pg_duamall to somewhere safe
pkgin remove postgresql17 packages
pkgin install postgresql18 packages
zap data directory
set LANG=C and other LC_ variables to C

/etc/rc.d/pgsql onestart

2026-07-15 09:44:50.670 BST [2380] FATAL:  could not create semaphores: No space left on device
2026-07-15 09:44:50.670 BST [2380] DETAIL:  Failed system call was semget(6316451, 17, 03600).
2026-07-15 09:44:50.670 BST [2380] HINT:  This error does *not* mean that you have run out of disk space.  It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), would be exceeded.  You need to raise the respective kernel parameter.  Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its "max_connections" parameter.

semget only requested 17 semaphores and failed? Default NetBSD has
128. Just in case

# sysctl -w kern.ipc.shmmni=1024
kern.ipc.shmmni: 128 -> 1024
# sysctl -w kern.ipc.shmseg=1024
kern.ipc.shmseg: 128 -> 1024

but same again.

replaced postgresql18 packages with postgresql17
replaced data directory
have functioning database with no shm issues


How is this possible?


Cheers,

Patrick


Home | Main Index | Thread Index | Old Index