|
| 1 | +* Introduce a simpler constructor API for ActiveRecord database adapters. |
| 2 | + |
| 3 | + Previously the adapter had to know how to build a new raw connection to |
| 4 | + support reconnect, but also expected to be passed an initial already- |
| 5 | + established connection. |
| 6 | + |
| 7 | + When manually creating an adapter instance, it will now accept a single |
| 8 | + config hash, and only establish the real connection on demand. |
| 9 | + |
| 10 | + *Matthew Draper* |
| 11 | + |
| 12 | +* Avoid redundant `SELECT 1` connection-validation query during DB pool |
| 13 | + checkout when possible. |
| 14 | + |
| 15 | + If the first query run during a request is known to be idempotent, it can be |
| 16 | + used directly to validate the connection, saving a network round-trip. |
| 17 | + |
| 18 | + *Matthew Draper* |
| 19 | + |
| 20 | +* Automatically reconnect broken database connections when safe, even |
| 21 | + mid-request. |
| 22 | + |
| 23 | + When an error occurs while attempting to run a known-idempotent query, and |
| 24 | + not inside a transaction, it is safe to immediately reconnect to the |
| 25 | + database server and try again, so this is now the default behavior. |
| 26 | + |
| 27 | + This new default should always be safe -- to support that, it's consciously |
| 28 | + conservative about which queries are considered idempotent -- but if |
| 29 | + necessary it can be disabled by setting the `connection_retries` connection |
| 30 | + option to `0`. |
| 31 | + |
| 32 | + *Matthew Draper* |
| 33 | + |
1 | 34 | * Avoid removing a PostgreSQL extension when there are dependent objects.
|
2 | 35 |
|
3 | 36 | Previously, removing an extension also implicitly removed dependent objects. Now, this will raise an error.
|
|
0 commit comments