summaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/postgresql.conf.sample
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-11-08 17:33:26 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2018-11-08 17:33:26 -0500
commit041ad9a66d28c3106a8bba79d94af447efc60347 (patch)
tree38803ddfbac468a79cc4e99e8a5e26310c5a884a /src/backend/utils/misc/postgresql.conf.sample
parent6fc2738edd9f40fce099ea1be3f592caef4ac6c5 (diff)
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 messages to the client. Perhaps that seemed like a useful option in the past, but the trouble with it is that it breaks guarantees that are explicitly made in our FE/BE protocol spec about how a query cycle can end. While libpq and psql manage to cope with the omission, that's mostly because they are not very bright; client libraries that have more semantic knowledge are 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_messages above ERROR. In HEAD, just remove the FATAL and PANIC options from the set of allowed enum values for client_min_messages. (This change also affects trace_recovery_messages, but that's OK since these aren't useful values for that variable either.) In the back branches, there was concern that rejecting these values might break applications that are explicitly setting things that way. I'm pretty skeptical of that argument, but accommodate it by accepting these values and then internally setting the variable to ERROR anyway. In all branches, this allows a couple of tiny simplifications in the logic in elog.c, so do that. Also respond to the point that was made that client_min_messages has exactly nothing to do with the server's logging behavior, and therefore does 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 Lane Discussion: https://postgr.es/m/7809.1541521180@sss.pgh.pa.us Discussion: https://postgr.es/m/15479-ef0f4cc2fd995ca2@postgresql.org
Diffstat (limited to 'src/backend/utils/misc/postgresql.conf.sample')
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 9a999c9359d..b6b683ec280 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -373,17 +373,6 @@
# - When to Log -
-#client_min_messages = notice # values in order of decreasing detail:
- # debug5
- # debug4
- # debug3
- # debug2
- # debug1
- # log
- # notice
- # warning
- # error
-
#log_min_messages = warning # values in order of decreasing detail:
# debug5
# debug4
@@ -527,6 +516,16 @@
# - Statement Behavior -
+#client_min_messages = notice # values in order of decreasing detail:
+ # debug5
+ # debug4
+ # debug3
+ # debug2
+ # debug1
+ # log
+ # notice
+ # warning
+ # error
#search_path = '"$user", public' # schema names
#default_tablespace = '' # a tablespace name, '' uses the default
#temp_tablespaces = '' # a list of tablespace names, '' uses