Commit bc4f28a
committed
refactor(server): improve statement timeout and parameter handling
- Add statement timeout configuration at pool level (pools.<pool_name>.statement_timeout)
- Add logging for statement timeout configuration during pool initialization
- Improve sync_parameters method to handle statement timeout consistently
- Document statement timeout configuration in CONFIG.md
- Change string initialization from String::from() to String::new()
- Maintain cleanup state until connection check-in for proper connection pooling
The statement timeout setting leverages PostgreSQL's native statement_timeout
parameter, allowing the database to handle query termination automatically.
This ensures reliable timeout enforcement directly at the database level,
rather than managing timeouts in the connection pooler. Pool-level settings
take precedence over user-level settings for consistent timeout enforcement
across all pool users.1 parent f8e2fcd commit bc4f28a
4 files changed
+48
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
461 | 471 | | |
462 | 472 | | |
463 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
544 | 547 | | |
545 | 548 | | |
546 | 549 | | |
| |||
674 | 677 | | |
675 | 678 | | |
676 | 679 | | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
677 | 684 | | |
678 | 685 | | |
679 | 686 | | |
| |||
783 | 790 | | |
784 | 791 | | |
785 | 792 | | |
| 793 | + | |
786 | 794 | | |
787 | 795 | | |
788 | 796 | | |
| |||
1276 | 1284 | | |
1277 | 1285 | | |
1278 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
1279 | 1297 | | |
1280 | 1298 | | |
1281 | 1299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1259 | 1259 | | |
1260 | 1260 | | |
1261 | 1261 | | |
1262 | | - | |
| 1262 | + | |
1263 | 1263 | | |
1264 | | - | |
1265 | | - | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
1266 | 1273 | | |
1267 | 1274 | | |
1268 | | - | |
1269 | | - | |
| 1275 | + | |
1270 | 1276 | | |
1271 | | - | |
| 1277 | + | |
1272 | 1278 | | |
1273 | 1279 | | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
1274 | 1285 | | |
1275 | 1286 | | |
1276 | 1287 | | |
| |||
0 commit comments