Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possible deadlock in the PostgreSQL specs
Force the lock_timeout and table_exists? queries to use the same connection, otherwise they could use two different connections, and the table_exists? query will hang until the database default lock timeout. This deadlock in the specs could only be hit if there were 3+ available connections in the connection pool before the spec was running (1 for the lock, 1 for the lock_timeout, 1 for the table_exists). If 0-2 available connections were in the pool, then 1 would be taken by the lock, and the 2nd would be used for both the lock_timeout and table_exists?.
- Loading branch information