Commit 0e0f43d
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 530fb68 commit 0e0f43d
1 file changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5022 | 5022 | | |
5023 | 5023 | | |
5024 | 5024 | | |
5025 | | - | |
| 5025 | + | |
| 5026 | + | |
5026 | 5027 | | |
5027 | 5028 | | |
5028 | 5029 | | |
| |||
5038 | 5039 | | |
5039 | 5040 | | |
5040 | 5041 | | |
5041 | | - | |
| 5042 | + | |
| 5043 | + | |
5042 | 5044 | | |
5043 | 5045 | | |
5044 | 5046 | | |
| |||
5153 | 5155 | | |
5154 | 5156 | | |
5155 | 5157 | | |
5156 | | - | |
| 5158 | + | |
| 5159 | + | |
5157 | 5160 | | |
5158 | 5161 | | |
5159 | 5162 | | |
| |||
5172 | 5175 | | |
5173 | 5176 | | |
5174 | 5177 | | |
5175 | | - | |
| 5178 | + | |
| 5179 | + | |
5176 | 5180 | | |
5177 | 5181 | | |
5178 | 5182 | | |
| |||
5186 | 5190 | | |
5187 | 5191 | | |
5188 | 5192 | | |
| 5193 | + | |
| 5194 | + | |
| 5195 | + | |
| 5196 | + | |
| 5197 | + | |
| 5198 | + | |
| 5199 | + | |
| 5200 | + | |
| 5201 | + | |
5189 | 5202 | | |
5190 | 5203 | | |
5191 | 5204 | | |
| |||
5202 | 5215 | | |
5203 | 5216 | | |
5204 | 5217 | | |
5205 | | - | |
| 5218 | + | |
| 5219 | + | |
5206 | 5220 | | |
5207 | 5221 | | |
5208 | 5222 | | |
| |||
0 commit comments