Use a simpler way to set extra options for benchmark test.

Commit 43a4f7173e fixed the case that there are extra options in the
connection string, but broke it in the case when there are not. Fix
that. But on second thoughts, it's more straightforward set the
options with ALTER DATABASE, so change the workflow yaml file to do
that instead.
This commit is contained in:
Heikki Linnakangas
2022-09-20 12:38:47 +03:00
committed by Heikki Linnakangas
parent 7863c4a702
commit a5019bf771
2 changed files with 10 additions and 5 deletions

View File

@@ -84,7 +84,7 @@ def run_test_pgbench(env: PgCompare, scale: int, duration: int, workload_type: P
if workload_type == PgBenchLoadType.INIT:
# Run initialize
options = "-cstatement_timeout=1h " + env.pg.default_options["options"]
options = "-cstatement_timeout=1h " + env.pg.default_options.get("options", "")
init_pgbench(env, ["pgbench", f"-s{scale}", "-i", env.pg.connstr(options=options)])
if workload_type == PgBenchLoadType.SIMPLE_UPDATE: