ipcclean cleans up shared memory and semaphore space left from aborted backends by deleting all such instances owned by user postgres. This program can cause crashes if run during multi-user execution, and hence should be used only by the DBA once the database has been shut down. This program should be executed if messages such as semget: No space left on device are encountered when starting up the postmaster or the backend server.
If this command is executed while postmaster is running, the shared memory and semaphores allocated by the postmaster will be deleted. This will result in a general failure of the backend servers started by that postmaster.
The script makes assumption about the format of output of the ipcs utility that may not be true across different operating systems.