# HG changeset patch # User Christophe de Vienne # Date 1412584478 -7200 # Node ID f2f065d406dcbe5fce5f84cc41838d0e8c5530ff # Parent 6b83ceda8323317ce518f5e7cfc5ad04ec5958f9 [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. diff -r 6b83ceda8323 -r f2f065d406dc devtools/__init__.py --- 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: