Specify additional lock timeout for postgres
Currently for postgres, we only specify a connect_timeout
.
Specify a timeout on locks as well, so that we avoid being deadlocked for long periods of time when a combination of bugs allows for that to happen.
For reference, this would throw the following exception:
sqlalchemy.exc.OperationalError: (psycopg2.errors.LockNotAvailable) canceling statement due to lock timeout
The timeout is the same as the one the user specifies as a connection-timeout
.
Edited by Marios Hadjimichael