Please consider moving the three main configuration files from /var/lib/postgresql/${SLOT}/data to /etc/postgresql-${SLOT} (pg_hba.conf, pg_ident.conf and postgresql.conf) and symlink them to /var/lib/postgresql/${SLOT}/data instead. This would have some advantages: - Backup: Backing up postgres config is easier because everybody just puts /etc into backup. (Remind that the data directory under /var/lib/postgresql normally should be excluded from backup explicitly and DB dumps should be backed up instead) - Users can easly find config files under /etc
This can be resolved. It cannot be resolved in one commit. It will take some time for the fix to really come about. A symlink will not be used as the solution.
Adding some info to the discussion, see also bug 175195 from 2007. Placing configuration files in /var/lib breaks the FHS[1]. People putting /etc under version control are unable to track config changes. People creating backups of /etc to secure host configuration are doomed. Upstream[2] supports moving config files out of the data storage. This can be done with runtime configuration, or alternatively, as Marc suggested, using symlinks. Thanks. [1] http://www.pathname.com/fhs/pub/fhs-2.3.html#VARLIBVARIABLESTATEINFORMATION "Users must never need to modify files in /var/lib to configure a package's operation." [2] http://www.postgresql.org/docs/9.0/interactive/runtime-config-file-locations.html "If you wish to keep the configuration files elsewhere than the data directory, the postgres -D command-line option or PGDATA environment variable must point to the directory containing the configuration files, and the data_directory parameter must be set in postgresql.conf (or on the command line) to show where the data directory is actually located. Notice that data_directory overrides -D and PGDATA for the location of the data directory, but not for the location of the configuration files."
Fixed. 21 Mar 2011; Aaron W. Swenson <titanofold@gentoo.org> +postgresql-server-8.2.20-r1.ebuild, +postgresql-server-8.3.14-r1.ebuild, +postgresql-server-8.4.7-r1.ebuild, +postgresql-server-9.0.3-r1.ebuild: Fixes bugs 274836, 302384, 323683, 325709, 347005, 347223, 353687 and 353750.