Vito Sansevero
e1e3bbc691
fix(system): make retiring a library connection race-free and cheap
...
Review round for the cross-thread close fix:
- cursor() now records its cursor under the lock _close_now copies the
cursor set under, and refuses once the connection is retired; a cursor
opened while the connection closed raised "Set changed size during
iteration" out of retire() on Python 3.10-3.12. retire() never raises,
retire_connections keeps going when one connection fails, and the mover
never reports a completed switch as failed because retiring or awaiting
old connections did.
- The restore's backup target is marked in use (ManagedConnection.using),
and in_transaction and create_function are guarded.
- Iterating a cursor marks the connection in use once per fetchmany(128)
chunk instead of once per row: a 1000-row scan costs 1.10x a plain
cursor instead of 2.7x (3.14) / 3.8x (3.10).
- Document what an interrupt does not end, the statements a retired
connection cannot hold back, close() from another thread returning
before the file is closed, and the await timeout ending as old-in-use.
2026-10-24 18:42:14 -07:00
..
2026-10-24 17:14:19 -07:00
2026-10-24 12:54:09 -07:00
2026-10-17 13:14:02 -07:00
2026-10-23 11:09:12 -07:00
2026-10-24 12:54:09 -07:00
2026-10-24 12:54:09 -07:00
2026-02-07 08:30:09 -08:00
2026-10-19 22:04:32 -07:00
2026-10-17 23:26:37 -07:00
2026-10-22 10:36:58 -07:00
2026-10-19 17:26:37 -07:00
2026-10-23 11:09:12 -07:00
2026-10-23 11:09:12 -07:00
2026-10-22 21:39:01 -07:00
2026-10-08 18:53:11 -07:00
2026-10-23 11:09:12 -07:00
2026-10-23 14:19:11 -07:00
2026-10-22 07:19:53 -07:00
2026-10-24 08:35:14 -07:00
2026-10-22 10:36:58 -07:00
2026-10-23 14:19:11 -07:00
2026-10-24 08:35:14 -07:00
2026-10-24 08:35:14 -07:00
2026-10-24 08:35:14 -07:00
2026-10-17 08:00:42 -07:00
2026-10-24 06:50:53 -07:00
2026-10-24 05:28:44 -07:00
2026-10-24 08:35:14 -07:00
2026-10-21 02:25:25 -07:00
2026-10-24 08:35:14 -07:00
2026-10-24 12:54:09 -07:00
2026-10-21 04:18:28 -07:00
2026-10-17 08:00:42 -07:00
2026-10-22 21:39:01 -07:00
2026-10-24 05:28:44 -07:00
2026-10-17 08:00:42 -07:00
2026-10-23 01:38:36 -07:00
2026-10-22 10:36:58 -07:00
2026-10-23 18:07:14 -07:00
2026-10-24 08:35:14 -07:00
2026-10-22 07:19:53 -07:00
2026-10-24 06:50:53 -07:00
2026-10-22 10:36:58 -07:00
2026-10-17 08:00:42 -07:00
2026-10-22 10:36:58 -07:00
2026-10-17 23:26:37 -07:00
2026-10-21 23:10:57 -07:00
2026-10-23 03:24:20 -07:00
2026-10-23 11:09:12 -07:00
2026-10-08 18:53:11 -07:00
2026-10-22 21:39:01 -07:00
2026-10-22 10:36:58 -07:00
2026-10-24 16:42:29 -07:00
2026-10-19 11:10:47 -07:00
2026-10-23 04:59:18 -07:00
2026-10-22 07:19:53 -07:00
2026-10-24 05:28:44 -07:00
2026-10-17 16:42:07 -07:00
2026-10-08 18:53:11 -07:00
2026-10-08 18:53:11 -07:00
2026-10-17 23:26:37 -07:00
2026-10-17 23:26:37 -07:00
2026-10-19 11:10:47 -07:00
2026-10-17 19:51:22 -07:00
2026-10-17 19:51:22 -07:00
2026-10-17 23:26:37 -07:00
2026-10-17 19:51:22 -07:00
2026-10-19 11:10:47 -07:00
2026-10-17 16:42:07 -07:00
2026-10-17 23:26:37 -07:00
2026-10-18 20:03:15 -07:00
2026-10-17 23:26:37 -07:00
2026-10-17 23:26:37 -07:00
2026-10-19 11:10:47 -07:00
2026-10-17 23:26:37 -07:00
2026-10-17 23:26:37 -07:00
2026-10-17 23:26:37 -07:00
2026-10-23 02:36:07 -07:00
2026-10-17 23:26:37 -07:00
2026-10-17 16:42:07 -07:00
2026-10-17 05:31:24 -07:00
2026-10-23 13:15:06 -07:00
2026-10-19 20:56:51 -07:00
2026-10-19 20:56:51 -07:00
2026-10-23 05:17:10 -07:00
2026-10-08 18:53:11 -07:00
2026-10-21 04:18:28 -07:00
2026-10-18 17:17:05 -07:00
2026-10-21 02:25:25 -07:00
2026-10-17 23:26:37 -07:00
2026-10-21 10:55:35 -07:00
2026-10-21 09:10:18 -07:00
2026-10-08 18:53:11 -07:00
2026-10-08 18:53:11 -07:00
2026-10-21 00:53:04 -07:00
2026-10-22 21:39:01 -07:00
2026-10-24 12:54:09 -07:00
2026-10-23 00:52:00 -07:00
2026-10-19 09:54:29 -07:00
2026-10-23 11:09:12 -07:00
2026-10-21 10:55:35 -07:00
2026-10-21 04:18:28 -07:00
2026-10-19 09:54:29 -07:00
2026-10-22 10:36:58 -07:00
2026-10-23 11:09:12 -07:00
2026-10-24 05:28:44 -07:00
2026-10-23 16:58:06 -07:00
2026-10-24 12:54:09 -07:00
2026-10-24 12:54:09 -07:00
2026-10-24 18:42:14 -07:00
2026-10-24 12:54:09 -07:00
2026-10-18 20:03:15 -07:00
2026-10-23 14:19:11 -07:00
2026-10-23 11:09:12 -07:00
2026-10-08 18:53:11 -07:00
2026-10-08 18:53:11 -07:00
2026-10-24 05:28:44 -07:00
2026-10-24 18:42:14 -07:00
2026-10-23 14:19:11 -07:00
2026-02-07 12:36:11 -08:00
2026-10-22 10:36:58 -07:00
2026-10-08 18:53:11 -07:00
2026-10-07 13:52:09 -07:00
2026-10-24 06:50:53 -07:00
2026-10-17 08:00:42 -07:00
2026-10-08 18:53:11 -07:00
2026-10-17 08:00:42 -07:00
2026-10-17 19:51:22 -07:00
2026-10-21 10:55:35 -07:00
2026-10-23 14:19:11 -07:00
2026-10-17 08:00:42 -07:00
2026-10-17 08:00:42 -07:00
2026-10-23 14:19:11 -07:00
2026-10-23 14:19:11 -07:00
2026-10-22 07:19:53 -07:00
2026-10-17 08:00:42 -07:00
2026-10-17 08:00:42 -07:00
2026-10-08 18:53:11 -07:00
2026-10-17 06:47:46 -07:00
2026-10-17 19:51:22 -07:00
2026-10-23 11:09:12 -07:00
2026-10-18 20:03:15 -07:00
2026-04-10 12:49:59 -07:00
2026-10-08 18:53:11 -07:00
2026-10-17 16:42:07 -07:00
2026-10-23 11:09:12 -07:00
2026-10-23 18:07:14 -07:00
2026-10-23 18:07:14 -07:00
2026-10-23 18:07:14 -07:00
2026-10-23 14:19:11 -07:00
2026-10-23 18:07:14 -07:00
2026-10-21 09:10:18 -07:00
2026-10-23 14:19:11 -07:00
2026-10-08 18:53:11 -07:00
2026-10-24 12:54:09 -07:00
2026-10-08 18:53:11 -07:00
2026-10-17 06:47:46 -07:00
2026-10-24 12:54:09 -07:00
2026-10-24 08:35:14 -07:00
2026-10-24 08:35:14 -07:00
2026-10-17 16:42:07 -07:00
2026-10-08 18:53:11 -07:00
2026-10-18 10:01:19 -07:00
2026-10-08 18:53:11 -07:00
2026-10-22 10:21:02 -07:00
2026-10-08 18:53:11 -07:00
2026-10-22 07:19:53 -07:00
2026-10-24 06:50:53 -07:00
2026-10-24 06:50:53 -07:00
2026-10-24 06:50:53 -07:00
2026-10-24 06:50:53 -07:00
2026-10-23 01:58:02 -07:00
2026-10-23 07:49:39 -07:00