Currently the postgresql-8.2.6 ebuild installs an /etc/conf.d/postgresql file, that specifies: PGOPTS="-N 40 -B 80" which effectively overrides the num_connections parameter from postgresql.conf to 40, and the shared_buffers value to 640 kbytes. This is bad for several reasons: 1) Users who are already familiar with PostgreSQL expect the values in postgresql.conf to have effect; in particular, the max_connections value is set to 100 by default, and users will be unpleasantly surprised when their installation exceeds 40 concurrent connections and starts failing. 2) The default value of 640 kbytes is the bare minimum for 40 concurrent connections; according to PostgreSQL documentation [1] "However, settings significantly higher than the minimum are usually needed for good performance. Several tens of megabytes are recommended for production installations." 3) PostgreSQL's initdb command (which is invoked by emerge --configure) already sets shared_buffers to a sane value depending on the running kernel. [1] [1] http://www.postgresql.org/docs/8.2/interactive/runtime-config-resource.html
Changing this will breaks *BSD, see Bug 189141.
(In reply to comment #1) > Changing this will breaks *BSD, see Bug 189141. As far as I can tell, bug 189141 was actually *caused* because Gentoo overrides the values set in the postgresql.conf file. If the conf.d script hadn't explicitly set the -N value, PostgreSQL would have used the one determined by initdb for that particular system. The documentation states: "The default is typically 100 connections, but may be less if your kernel settings will not support it (as determined during initdb)." http://www.postgresql.org/docs/8.2/interactive/runtime-config-connection.html#GUC-MAX-CONNECTIONS
Created attachment 141423 [details, diff] Patch to dev-db/postgresql/files/postgresql.conf-8.2 Maybe I wasn't being clear enough; What I meant was, I would like to see PGOPTS value unset by default altogether.
We don't do that again in dev-db/postgresql-server