- Notifications
You must be signed in to change notification settings - Fork5.2k
Commitb53b881
committed
Improve error message when standby does accept connections.
Even after reaching the minimum recovery point, if there are long-livedwrite transactions with 64 subtransactions on the primary, the recoverysnapshot may not yet be ready for hot standby, delaying read-onlyconnections on the standby. Previously, when read-only connections werenot accepted due to this condition, the following error message was logged: FATAL: the database system is not yet accepting connections DETAIL: Consistent recovery state has not been yet reached.This DETAIL message was misleading because the following message wasalready logged in this case: LOG: consistent recovery state reachedThis contradiction, i.e., indicating that the recovery state was consistentwhile also stating it wasn’t, caused confusion.This commit improves the error message to better reflect the actual state: FATAL: the database system is not yet accepting connections DETAIL: Recovery snapshot is not yet ready for hot standby. HINT: To enable hot standby, close write transactions with more than 64 subtransactions on the primary server.To implement this, the commit introduces a new postmaster signal,PMSIGNAL_RECOVERY_CONSISTENT. When the startup process reachesa consistent recovery state, it sends this signal to the postmaster,allowing it to correctly recognize that state.Since this is not a clear bug, the change is applied only to the masterbranch and is not back-patched.Author: Atsushi Torikoshi <torikoshia@oss.nttdata.com>Co-authored-by: Fujii Masao <masao.fujii@gmail.com>Reviewed-by: Yugo Nagata <nagata@sraoss.co.jp>Discussion:https://postgr.es/m/02db8cd8e1f527a8b999b94a4bee3165@oss.nttdata.com1 parent121d774 commitb53b881
File tree
6 files changed
+38
-13
lines changed- doc/src/sgml
- src
- backend
- access/transam
- postmaster
- tcop
- include
- storage
- tcop
6 files changed
+38
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1535 | 1535 | | |
1536 | 1536 | | |
1537 | 1537 | | |
1538 | | - | |
| 1538 | + | |
| 1539 | + | |
1539 | 1540 | | |
1540 | 1541 | | |
1541 | 1542 | | |
| |||
1974 | 1975 | | |
1975 | 1976 | | |
1976 | 1977 | | |
1977 | | - | |
1978 | | - | |
1979 | | - | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
1980 | 1984 | | |
1981 | 1985 | | |
1982 | 1986 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
294 | 299 | | |
295 | 300 | | |
296 | 301 | | |
| |||
2248 | 2253 | | |
2249 | 2254 | | |
2250 | 2255 | | |
| 2256 | + | |
2251 | 2257 | | |
2252 | 2258 | | |
2253 | 2259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1825 | 1825 | | |
1826 | 1826 | | |
1827 | 1827 | | |
1828 | | - | |
1829 | | - | |
| 1828 | + | |
1830 | 1829 | | |
1831 | 1830 | | |
1832 | 1831 | | |
| |||
3699 | 3698 | | |
3700 | 3699 | | |
3701 | 3700 | | |
| 3701 | + | |
3702 | 3702 | | |
3703 | 3703 | | |
3704 | 3704 | | |
| |||
3724 | 3724 | | |
3725 | 3725 | | |
3726 | 3726 | | |
3727 | | - | |
| 3727 | + | |
3728 | 3728 | | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
3729 | 3735 | | |
3730 | 3736 | | |
3731 | 3737 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | | - | |
310 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
314 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
315 | 323 | | |
316 | 324 | | |
317 | 325 | | |
318 | | - | |
319 | | - | |
| 326 | + | |
| 327 | + | |
320 | 328 | | |
321 | 329 | | |
322 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments
Comments
(0)