[devtools][pg] Activate the non-durability settings of Postgresql.
It speed up the PG tests by a factor of 3.
See http://www.postgresql.org/docs/current/static/non-durability.html.
--- a/devtools/__init__.py Mon Nov 17 09:32:37 2014 +0100
+++ b/devtools/__init__.py Mon Oct 06 10:34:38 2014 +0200
@@ -560,8 +560,12 @@
env = os.environ.copy()
env['PGPORT'] = str(port)
env['PGHOST'] = str(directory)
+ options = '-h "" -k %s -p %s' % (directory, port)
+ options += ' -c fsync=off -c full_page_writes=off'
+ options += ' -c synchronous_commit=off'
try:
- subprocess.check_call(['pg_ctl', 'start', '-w', '-D', datadir, '-o', '-h "" -k %s -p %s' % (directory, port)],
+ subprocess.check_call(['pg_ctl', 'start', '-w', '-D', datadir,
+ '-o', options],
env=env)
except OSError, err:
if err.errno == errno.ENOENT: