Commit e3439a4
committed
Prevent starting a standalone backend with standby_mode on.
This can't really work because standby_mode expects there to be more
WAL arriving, which there will not ever be because there's no WAL
receiver process to fetch it. Moreover, if standby_mode is on then
hot standby might also be turned on, causing even more strangeness
because that expects read-only sessions to be executing in parallel.
Bernd Helmle reported a case where btree_xlog_delete_get_latestRemovedXid
got confused, but rather than band-aiding individual problems it seems
best to prevent getting anywhere near this state in the first place.
Back-patch to all supported branches.
In passing, also fix some omissions of errcodes in other ereport's in
readRecoveryCommandFile().
Michael Paquier (errcode hacking by me)
Discussion: <00F0B2CEF6D0CEF8A90119D4@eje.credativ.lan>1 parent 934630c commit e3439a4
1 file changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5347 | 5347 | | |
5348 | 5348 | | |
5349 | 5349 | | |
5350 | | - | |
| 5350 | + | |
| 5351 | + | |
5351 | 5352 | | |
5352 | 5353 | | |
5353 | 5354 | | |
| |||
5363 | 5364 | | |
5364 | 5365 | | |
5365 | 5366 | | |
5366 | | - | |
| 5367 | + | |
| 5368 | + | |
5367 | 5369 | | |
5368 | 5370 | | |
5369 | 5371 | | |
| |||
5454 | 5456 | | |
5455 | 5457 | | |
5456 | 5458 | | |
5457 | | - | |
| 5459 | + | |
| 5460 | + | |
5458 | 5461 | | |
5459 | 5462 | | |
5460 | 5463 | | |
| |||
5473 | 5476 | | |
5474 | 5477 | | |
5475 | 5478 | | |
5476 | | - | |
| 5479 | + | |
| 5480 | + | |
5477 | 5481 | | |
5478 | 5482 | | |
5479 | 5483 | | |
| 5484 | + | |
| 5485 | + | |
| 5486 | + | |
| 5487 | + | |
| 5488 | + | |
| 5489 | + | |
| 5490 | + | |
| 5491 | + | |
| 5492 | + | |
5480 | 5493 | | |
5481 | 5494 | | |
5482 | 5495 | | |
| |||
5493 | 5506 | | |
5494 | 5507 | | |
5495 | 5508 | | |
5496 | | - | |
| 5509 | + | |
| 5510 | + | |
5497 | 5511 | | |
5498 | 5512 | | |
5499 | 5513 | | |
| |||
0 commit comments