On Sat, Oct 16, 2021 at 03:13:39PM +0300, Mikhail wrote:
> Hello, I was troubleshooting postgresql not being able to start after
> 'pkill -6 postgres'. The error was:
> 
> FATAL: could not create semaphores: No space left on device
> DETAIL: Failed system call was semget(78927, 17, 03600).
> 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. The PostgreSQL documentation contains
> more information about configuring your system for PostgreSQL.
> 
> It would have saved me about half a day, if ipcs(1) was mentioned on
> semget(2) man page, web is very short of information about SysV
> semaphore management.
> 
> I thought about adding ipcrm(1) ref too, but decided that it's already
> mentioned on ipcs(1) man page and it would be nice to keep things short,
> but I can redo the patch, if it will be found useful at all.

It turns out that shmat(2) and shmdt(2) man page already mentions
ipcrm(1) and ipcs(1), but it's not mentioned on shmctl(2) and sem*
functions - inlined patch makes things even.

mandoc -T lint is passed.

Comments, OKs?

diff --git lib/libc/sys/semctl.2 lib/libc/sys/semctl.2
index b76b9812692..811270269b8 100644
--- lib/libc/sys/semctl.2
+++ lib/libc/sys/semctl.2
@@ -235,5 +235,7 @@ or the values in
 are greater than the system-imposed limit.
 .El
 .Sh SEE ALSO
+.Xr ipcrm 1 ,
+.Xr ipcs 1 ,
 .Xr semget 2 ,
 .Xr semop 2
diff --git lib/libc/sys/semget.2 lib/libc/sys/semget.2
index 7627e49549a..e06023d16f7 100644
--- lib/libc/sys/semget.2
+++ lib/libc/sys/semget.2
@@ -147,6 +147,8 @@ and no semaphore set associated with
 was found.
 .El
 .Sh SEE ALSO
+.Xr ipcrm 1 ,
+.Xr ipcs 1 ,
 .Xr semctl 2 ,
 .Xr semop 2 ,
 .Xr ftok 3
diff --git lib/libc/sys/semop.2 lib/libc/sys/semop.2
index 691cb5b1b95..6b023207664 100644
--- lib/libc/sys/semop.2
+++ lib/libc/sys/semop.2
@@ -152,5 +152,7 @@ was set in
 points to an illegal address.
 .El
 .Sh SEE ALSO
+.Xr ipcrm 1 ,
+.Xr ipcs 1 ,
 .Xr semctl 2 ,
 .Xr semget 2
diff --git lib/libc/sys/shmctl.2 lib/libc/sys/shmctl.2
index 801c7cecbda..a272d1f482d 100644
--- lib/libc/sys/shmctl.2
+++ lib/libc/sys/shmctl.2
@@ -185,6 +185,8 @@ is not a valid command.
 specifies an invalid address.
 .El
 .Sh SEE ALSO
+.Xr ipcrm 1 ,
+.Xr ipcs 1 ,
 .Xr shmat 2 ,
 .Xr shmget 2
 .Sh STANDARDS

Reply via email to