Commit b00a16b
committed
Make invalid primary_slot_name follow standard GUC error reporting.
Previously, if primary_slot_name was set to an invalid slot name and
the configuration file was reloaded, both the postmaster and all other
backend processes reported a WARNING. With many processes running,
this could produce a flood of duplicate messages. The problem was that
the GUC check hook for primary_slot_name reported errors at WARNING
level via ereport().
This commit changes the check hook to use GUC_check_errdetail() and
GUC_check_errhint() for error reporting. As with other GUC parameters,
this causes non-postmaster processes to log the message at DEBUG3,
so by default, only the postmaster's message appears in the log file.
Backpatch to all supported versions.
Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Chao Li <lic@highgo.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/CAHGQGwFud-cvthCTfusBfKHBS6Jj6kdAPTdLWKvP2qjUX6L_wA@mail.gmail.com
Backpatch-through: 131 parent 7d7ebdb commit b00a16b
3 files changed
+58
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
169 | 198 | | |
170 | 199 | | |
171 | 200 | | |
172 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
173 | 205 | | |
174 | 206 | | |
175 | | - | |
| 207 | + | |
| 208 | + | |
176 | 209 | | |
177 | 210 | | |
178 | 211 | | |
179 | 212 | | |
180 | 213 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
185 | 217 | | |
186 | 218 | | |
187 | 219 | | |
188 | 220 | | |
189 | 221 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
194 | 225 | | |
195 | 226 | | |
196 | 227 | | |
| |||
200 | 231 | | |
201 | 232 | | |
202 | 233 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
208 | 237 | | |
209 | 238 | | |
210 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12128 | 12128 | | |
12129 | 12129 | | |
12130 | 12130 | | |
| 12131 | + | |
| 12132 | + | |
| 12133 | + | |
| 12134 | + | |
12131 | 12135 | | |
12132 | | - | |
| 12136 | + | |
| 12137 | + | |
| 12138 | + | |
| 12139 | + | |
| 12140 | + | |
| 12141 | + | |
| 12142 | + | |
12133 | 12143 | | |
| 12144 | + | |
12134 | 12145 | | |
12135 | 12146 | | |
12136 | 12147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| |||
0 commit comments