- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit3d360e2
committed
Disallow setting client_min_messages higher than ERROR.
Previously it was possible to set client_min_messages to FATAL or PANIC,which had the effect of suppressing transmission of regular ERROR messagesto the client. Perhaps that seemed like a useful option in the past, butthe trouble with it is that it breaks guarantees that are explicitly madein our FE/BE protocol spec about how a query cycle can end. While libpqand psql manage to cope with the omission, that's mostly because theyare not very bright; client libraries that have more semantic knowledgeare likely to get confused. Notably, pgODBC doesn't behave very sanely.Let's fix this by getting rid of the ability to set client_min_messagesabove ERROR.In HEAD, just remove the FATAL and PANIC options from the set of allowedenum values for client_min_messages. (This change also affectstrace_recovery_messages, but that's OK since these aren't useful valuesfor that variable either.)In the back branches, there was concern that rejecting these values mightbreak applications that are explicitly setting things that way. I'mpretty skeptical of that argument, but accommodate it by accepting thesevalues and then internally setting the variable to ERROR anyway.In all branches, this allows a couple of tiny simplifications in thelogic in elog.c, so do that.Also respond to the point that was made that client_min_messages hasexactly nothing to do with the server's logging behavior, and thereforedoes not belong in the "When To Log" subsection of the documentation.The "Statement Behavior" subsection is a better match, so move it there.Jonah Harris and Tom LaneDiscussion:https://postgr.es/m/7809.1541521180@sss.pgh.pa.usDiscussion:https://postgr.es/m/15479-ef0f4cc2fd995ca2@postgresql.org1 parent705d433 commit3d360e2
File tree
4 files changed
+37
-47
lines changed- doc/src/sgml
- src/backend/utils
- error
- misc
4 files changed
+37
-47
lines changedLines changed: 22 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5111 | 5111 |
| |
5112 | 5112 |
| |
5113 | 5113 |
| |
5114 |
| - | |
5115 |
| - | |
5116 |
| - | |
5117 |
| - | |
5118 |
| - | |
5119 |
| - | |
5120 |
| - | |
5121 |
| - | |
5122 |
| - | |
5123 |
| - | |
5124 |
| - | |
5125 |
| - | |
5126 |
| - | |
5127 |
| - | |
5128 |
| - | |
5129 |
| - | |
5130 |
| - | |
5131 |
| - | |
5132 |
| - | |
5133 |
| - | |
5134 |
| - | |
5135 |
| - | |
5136 | 5114 |
| |
5137 | 5115 |
| |
5138 | 5116 |
| |
| |||
5150 | 5128 |
| |
5151 | 5129 |
| |
5152 | 5130 |
| |
5153 |
| - | |
| 5131 | + | |
5154 | 5132 |
| |
5155 | 5133 |
| |
5156 | 5134 |
| |
| |||
6471 | 6449 |
| |
6472 | 6450 |
| |
6473 | 6451 |
| |
| 6452 | + | |
| 6453 | + | |
| 6454 | + | |
| 6455 | + | |
| 6456 | + | |
| 6457 | + | |
| 6458 | + | |
| 6459 | + | |
| 6460 | + | |
| 6461 | + | |
| 6462 | + | |
| 6463 | + | |
| 6464 | + | |
| 6465 | + | |
| 6466 | + | |
| 6467 | + | |
| 6468 | + | |
| 6469 | + | |
| 6470 | + | |
| 6471 | + | |
| 6472 | + | |
6474 | 6473 |
| |
6475 | 6474 |
| |
6476 | 6475 |
| |
|
Lines changed: 2 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
469 | 469 |
| |
470 | 470 |
| |
471 | 471 |
| |
472 |
| - | |
473 |
| - | |
474 |
| - | |
| 472 | + | |
475 | 473 |
| |
476 | 474 |
| |
477 | 475 |
| |
| |||
1747 | 1745 |
| |
1748 | 1746 |
| |
1749 | 1747 |
| |
1750 |
| - | |
1751 |
| - | |
1752 |
| - | |
1753 |
| - | |
1754 |
| - | |
1755 |
| - | |
| 1748 | + | |
1756 | 1749 |
| |
1757 | 1750 |
| |
1758 | 1751 |
| |
|
Lines changed: 3 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
215 | 215 |
| |
216 | 216 |
| |
217 | 217 |
| |
218 |
| - | |
| 218 | + | |
| 219 | + | |
219 | 220 |
| |
220 | 221 |
| |
221 | 222 |
| |
| |||
229 | 230 |
| |
230 | 231 |
| |
231 | 232 |
| |
232 |
| - | |
233 |
| - | |
234 | 233 |
| |
235 | 234 |
| |
236 | 235 |
| |
| |||
3924 | 3923 |
| |
3925 | 3924 |
| |
3926 | 3925 |
| |
3927 |
| - | |
| 3926 | + | |
3928 | 3927 |
| |
3929 | 3928 |
| |
3930 | 3929 |
| |
|
Lines changed: 10 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
406 | 406 |
| |
407 | 407 |
| |
408 | 408 |
| |
409 |
| - | |
410 |
| - | |
411 |
| - | |
412 |
| - | |
413 |
| - | |
414 |
| - | |
415 |
| - | |
416 |
| - | |
417 |
| - | |
418 |
| - | |
419 |
| - | |
420 | 409 |
| |
421 | 410 |
| |
422 | 411 |
| |
| |||
561 | 550 |
| |
562 | 551 |
| |
563 | 552 |
| |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
564 | 563 |
| |
565 | 564 |
| |
566 | 565 |
| |
|
0 commit comments
Comments
(0)