From 5affc7aead40db9e0dd9d6552971a196142806e8 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Jul 11 2016 10:19:11 +0000 Subject: Use version-independent way to pass socket dir to postgres With version <9.3 we would need to specify unix_socket_directory and with >=9.3 we would need unix_socket_directories. Both versions have a -k flag which is equivalient to setting either option, so this makes it compatible across all versions. Signed-off-by: Patrick Uiterwijk Reviewed-by: Pierre-Yves Chibon Reviewed-by: Howard Johnson --- diff --git a/tests/helpers/common.py b/tests/helpers/common.py index 70dffd2..409ffe5 100755 --- a/tests/helpers/common.py +++ b/tests/helpers/common.py @@ -250,7 +250,7 @@ basicConstraints = CA:false""" % {'certdir': os.path.join(self.testdir, def start_pgdb_server(self, datadir, rundir, log, addr, port, env): p = subprocess.Popen(['/usr/bin/pg_ctl', 'start', '-D', datadir, '-o', - '-c unix_socket_directories=%s -c port=%s -c \ + '-k %s -c port=%s -c \ listen_addresses=%s' % (rundir, port, addr), '-l', log, '-w'], env=env, preexec_fn=os.setsid)