Commit 1b30302a authored by Christoph Berg's avatar Christoph Berg

PgCommon.pm, pg_ctlcluster, pg_createcluster: 9.3 renames

unix_socket_directory to unix_socket_directories.
parent a878de7c
......@@ -354,7 +354,7 @@ sub cluster_data_directory {
sub get_cluster_socketdir {
# if it is explicitly configured, just return it
my $socketdir = get_conf_value($_[0], $_[1], 'postgresql.conf',
'unix_socket_directory');
$_[0] >= 9.3 ? 'unix_socket_directories' : 'unix_socket_directory');
return $socketdir if $socketdir;
# try to determine whether this is a postgres owned cluster and we default
......@@ -383,7 +383,9 @@ sub get_cluster_socketdir {
# Set the socket directory of a particular cluster.
# Arguments: <version> <cluster> <directory>
sub set_cluster_socketdir {
set_conf_value $_[0], $_[1], 'postgresql.conf', 'unix_socket_directory', $_[2];
set_conf_value $_[0], $_[1], 'postgresql.conf',
$_[0] >= 9.3 ? 'unix_socket_directories' : 'unix_socket_directory',
$_[2];
}
# Return the path of a program of a particular version.
......
......@@ -10,8 +10,10 @@ postgresql-common (139) UNRELEASED-experimental; urgency=low
* testsuite: Require netcat-openbsd to be installed.
* testsute 005_PgCommon: Do the ipv4 tests before the ipv6 ones; skip
the ipv6 for perl <= 5.10 (i.e. on squeeze and lucid).
* PgCommon.pm, pg_ctlcluster, pg_createcluster: 9.3 renames
unix_socket_directory to unix_socket_directories.
-- Christoph Berg <myon@debian.org> Mon, 17 Dec 2012 12:19:31 +0100
-- Christoph Berg <myon@debian.org> Thu, 03 Jan 2013 16:27:40 +0100
postgresql-common (138) experimental; urgency=low
......
......@@ -368,8 +368,9 @@ unless ($socketdir) {
$socketdir = '/var/run/postgresql';
} else {
$socketdir='/tmp';
my $usd = $version >= 9.3 ? 'unix_socket_directories' : 'unix_socket_directory';
print "Warning: The socket directory for owners other than 'postgres'
defaults to /tmp. You might want to change the unix_socket_directory parameter
defaults to /tmp. You might want to change the $usd parameter
in postgresql.conf to a more secure directory.
"
}
......
......@@ -138,8 +138,9 @@ sub start {
%ENV = read_cluster_conf_file $version, $cluster, 'environment';
my $postmaster_opts = '';
if (!(PgCommon::get_conf_value $version, $cluster, 'postgresql.conf', 'unix_socket_directory')) {
$postmaster_opts .= '-c unix_socket_directory="' . $info{'socketdir'} . '"';
my $usd = $version >= 9.3 ? 'unix_socket_directories' : 'unix_socket_directory';
if (!(PgCommon::get_conf_value $version, $cluster, 'postgresql.conf', $usd)) {
$postmaster_opts .= "-c $usd=\"$info{'socketdir'}\"";
}
$postmaster_opts .= " -c config_file=\"$cdir/postgresql.conf\"";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment