Commit d905902
committed
Fix connection_ping() to check transaction_status before SELECT 1 and return 503 CONNECTION_LOST
- Check transaction_status before executing ping query to avoid disrupting
long-running queries or active transactions (addresses review feedback).
Moved the check inside try-except to handle race conditions where the
connection drops between connected() and transaction_status access.
- Return 503 service_unavailable with CONNECTION_LOST info instead of 500
internal_server_error when reconnect fails in children() endpoint, so the
tree_nodes.ts reconnect dialog is properly triggered.1 parent 9c30a41 commit d905902
File tree
2 files changed
+19
-2
lines changed- web/pgadmin
- browser
- utils/driver/psycopg3
2 files changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
444 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1425 | 1425 | | |
1426 | 1426 | | |
1427 | 1427 | | |
| 1428 | + | |
1428 | 1429 | | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
1429 | 1444 | | |
1430 | 1445 | | |
1431 | 1446 | | |
| |||
0 commit comments