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.
1 | cat /proc/sys/kernel/sem |
1 | ipcs -ls |
1 | sysctl -p |
The Solution of the Error:
We enter the sysctl.conf file with the following command.
1 | vi /etc/sysctl.conf |
Then we come to an empty line and press the insert key from the keyboard to add the following line to this file.
1 | kernel.sem = 50100 128256000 50100 2560 |
To save the file and exit, press Esc, wq, Enter, respectively.