diff --git a/pg_perfbench/db_operations/conn_tasks/local.py b/pg_perfbench/db_operations/conn_tasks/local.py index 252407c..d179cad 100644 --- a/pg_perfbench/db_operations/conn_tasks/local.py +++ b/pg_perfbench/db_operations/conn_tasks/local.py @@ -11,7 +11,7 @@ def __init__(self, db_conf, conn, logger): async def stop_db(self): try: res = await self.conn.run_command( - f"su - postgres -c '{self.pg_bin_path}/pg_ctl stop -D {self.pg_data_path}'" + f"{self.pg_bin_path}/pg_ctl stop -D {self.pg_data_path}" ) return res except Exception as e: @@ -21,7 +21,7 @@ async def stop_db(self): async def start_db(self): res = await self.conn.run_command( - f"su - postgres -c '{self.pg_bin_path}/pg_ctl start -D {self.pg_data_path}'" + f"{self.pg_bin_path}/pg_ctl start -D {self.pg_data_path}" ) return res