When multiple tables are validated in a single command we are building up a number of idle connections, at least in Oracle and PostgreSQL we are. Example command where ${TABLES} contains find-tables output of 23 tables:
When I checked Oracle & PostgreSQL during the command we accumulated > 12 idle connections.
I changed the DataValidation class to support being called from a context manager and explicitly closed connections on exit. After this my test command never had more than two connections open at any time.
I also added some code to Oracle client to tag database sessions with "DVT" string.
When multiple tables are validated in a single command we are building up a number of idle connections, at least in Oracle and PostgreSQL we are. Example command where ${TABLES} contains
find-tables
output of 23 tables:When I checked Oracle & PostgreSQL during the command we accumulated > 12 idle connections.
I changed the
DataValidation
class to support being called from a context manager and explicitly closed connections on exit. After this my test command never had more than two connections open at any time.I also added some code to Oracle client to tag database sessions with "DVT" string.