-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Benchmark] Fix PostgreSQL timeout and clean-up.
- The *process* of the query within the PostgreSQL server can reach a timeout. In that case, we kill the `psql` client. This, however, does not stop the *process* within the server. Consequently, clean-up after an experiment trying to run `DROP DATABASE` will trigger an error, as a table in the DB to drop is still in use. To properly *"kill"* the server *process* we install *in PostgreSQL* a timeout with `set statement_timeout`. This has the server kill *processes* that reach the specified timeout. - The clean-up after an experiment must `DROP DATABASE` the table with the benchmark input data. This was run incorrectly in one iteration of a loop right before the next iteration would attempt to that exact database, which would then have been dropped. We generally change the structure of the code to use *local* `psycopg2` connections and always close them properly in a `finally` section. Further, the `run_command()` no longer runs `clean_up()` itself.
- Loading branch information
1 parent
e0478b0
commit 4241f72
Showing
1 changed file
with
72 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters