If you face a error related to semaphore and a message informing NO space left on the device. It is not related to the disk space but the it is exhausting the number of semaphores
It occurs when either the system limit for the maximum number of semaphore sets (SEMMNI), or the system wide maximum number of semaphores (SEMMNS), is exceeded. You need to raise the respective kernel parameter. Alternatively, reduce PostgreSQL's consumption of semaphores by reducing its max_connections parameter.