[FIX] sql_db: free dead database connections
Launchpad automatic translations update.
[FIX] sql_db: closing a closed connection is not allowed in psycopg2 2.4.4 and earlier

Having the connections automatically reaped by
psycopg2 is not guaranteed to happen all the
time, so we still need to take extra steps
to forece-close them
[MERGE] sql_db: autodetect dead connections and discard them
[FIX] setup.py: bump up min required psycopg2 version for 7.0, because 2.2 is actually required

Debian stable has 2.2.1 since 2010, so that
should not cause problems for anyone.
[FIX] sql_db: typo in previous patch for autodetection of closed connections

My bad, I did and undid this patch several times
in different manners and ended up commiting the
wrong one.
[MERGE] Merge with 7.0
[FIX] sql_db: only perform the connection reset when actually planning to borrow that connection, not before, for obvious performance reasons
[FIX] Lowering the start of the contents of the reports under the company header by default in order to avoid overlap
[MERGE] lp:1098542. Reports starting too high
[FIX] sql_db: immediately remove the connections from the pool when detected to be dead
[MERGE] sql_db: improve performance of previous patch for auto-detecting dead connections

Avoid calling reset() on connections that are used +
only do it on the connection that is being returned,
which is much more efficient.
Launchpad automatic translations update.
Launchpad automatic translations update.