Skip to content

v0.0.33: [Benchmark] Fix PostgreSQL timeout and clean-up.

Compare
Choose a tag to compare
@mirror-releases mirror-releases released this 11 May 16:16
· 812 commits to main since this release
4241f72
- 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.