forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitdf93844
committed
Improve connection denied error message during recovery.
Previously when an archive recovery or a standby was starting andreached the consistent recovery state but hot_standby was configuredto off, the error message when a client connectted was "the databasesystem is starting up", which was needless confusing and not reallyall that accurate either.This commit improves the connection denied error message duringrecovery, as follows, so that the users immediately know that theirservers are configured to deny those connections.- If hot_standby is disabled, the error message "the database system is not accepting connections" and the detail message "Hot standby mode is disabled." are output when clients connect while an archive recovery or a standby is running.- If hot_standby is enabled, the error message "the database system is not yet accepting connections" and the detail message "Consistent recovery state has not been yet reached." are output when clients connect until the consistent recovery state is reached and postmaster starts accepting read only connections.This commit doesn't change the connection denied error message of"the database system is starting up" during normal server startup andcrash recovery. Because it's still suitable for those situations.Author: James ColemanReviewed-by: Alvaro Herrera, Andres Freund, David Zhang, Tom Lane, Fujii MasaoDiscussion:https://postgr.es/m/CAAaqYe8h5ES_B=F_zDT+Nj9XU7YEwNhKhHA2RE4CFhAQ93hfig@mail.gmail.com1 parentb34ca59 commitdf93844
2 files changed
+22
-4
lines changedLines changed: 16 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2294 | 2294 |
| |
2295 | 2295 |
| |
2296 | 2296 |
| |
| 2297 | + | |
| 2298 | + | |
| 2299 | + | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
2297 | 2309 |
| |
2298 | 2310 |
| |
2299 | 2311 |
| |
| |||
2435 | 2447 |
| |
2436 | 2448 |
| |
2437 | 2449 |
| |
2438 |
| - | |
2439 |
| - | |
2440 |
| - | |
| 2450 | + | |
2441 | 2451 |
| |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
2442 | 2455 |
| |
2443 | 2456 |
| |
2444 | 2457 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
73 |
| - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 |
| |
75 | 80 |
| |
76 | 81 |
| |
|
0 commit comments
Comments
(0)