I'm having some issues with "too many clients" and I tried to change the max_connections param (currently 100). I tried to set some value like 300, but when I restart the service, I got this
postgresql.service - LEGACY unit for "postgresql" rc script
Loaded: loaded (/etc/rc.conf)
Active: failed (Result: exit-code) since Mon 2013-02-18 15:55:37 BRT; 1min 8s ago
Docs: man:arch-daemons(8)
Process: 7216 ExecStop=/etc/rc.d/postgresql stop (code=exited, status=0/SUCCESS)
Process: 8375 ExecStart=/etc/rc.d/postgresql start (code=exited, status=1/FAILURE)
Process: 8372 ExecStartPre=/usr/bin/echo WARNING: A legacy rc script is being used. Consider removing this from your DAEMONS array and enabling a native systemd service instead. (code=exited, status=0/SUCCESS)
Main PID: 19616 (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/postgresql.service
Feb 18 15:55:32 gtsserver echo[8372]: WARNING: A legacy rc script is being used. Consider removing this from y...tead.
Feb 18 15:55:32 gtsserver su[8381]: (to postgres) root on none
Feb 18 15:55:32 gtsserver su[8381]: pam_unix(su-l:session): session opened for user postgres by (uid=0)
Feb 18 15:55:37 gtsserver postgresql[8375]: :: Starting PostgreSQL [BUSY] pg_ctl: could not start server
Feb 18 15:55:37 gtsserver postgresql[8375]: Examine the log output.
Feb 18 15:55:37 gtsserver postgresql[8375]: [FAIL]
Feb 18 15:55:37 gtsserver systemd[1]: postgresql.service: control process exited, code=exited status=1
Feb 18 15:55:37 gtsserver systemd[1]: Failed to start LEGACY unit for "postgresql" rc script.
Feb 18 15:55:37 gtsserver systemd[1]: Unit postgresql.service entered failed state
Tried with 150, same behavior...
It happens the same error if I change shared buffer (currently 24), to something like 32.
The server is a 8GB arch linux
Linux gtsserver 3.7.8-1-ck #1 SMP PREEMPT Thu Feb 14 19:14:20 EST 2013 x86_64 GNU/Linux
postgres.conf. See Managing Kernel Resources. But you should find these logs to be sure and know the exact allocation size that failed. – Daniel Vérité Feb 18 at 20:31