If you increase the value of the MAX_Connections parameter in the postgresql.conf file, you can get this error while starting the PostgreSQL service.
You should read article titled “FATAL: remaining connection slots are reserved for non-replication superuser connections” for increasing the MAX_Connection parameter.
You can see the current semaphore values when you run one of the following commands while you are root user.
The Solution of the Error:
We enter the sysctl.conf file with the following command.
Then we come to an empty line and press the insert key from the keyboard to add the following line to this file.
kernel.sem = 50100 128256000 50100 2560
To save the file and exit, press Esc, wq, Enter, respectively.