pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Disallow setting client_min_messages higher than ERROR.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Disallow setting client_min_messages higher than ERROR.
@ 2018-11-08 22:34  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-11-08 22:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3d360e20c9ae48a8139b4dd84f5a8bacc392d8e9

Modified Files
--------------
doc/src/sgml/config.sgml                      | 45 +++++++++++++--------------
src/backend/utils/error/elog.c                | 11 ++-----
src/backend/utils/misc/guc.c                  |  7 ++---
src/backend/utils/misc/postgresql.conf.sample | 21 ++++++-------
4 files changed, 37 insertions(+), 47 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow setting client_min_messages higher than ERROR.
@ 2018-11-08 22:34  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-11-08 22:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c09daa9104099422ea998e0398934ca82eb37898

Modified Files
--------------
doc/src/sgml/config.sgml                      | 45 +++++++++++++--------------
src/backend/utils/error/elog.c                | 11 ++-----
src/backend/utils/misc/guc.c                  | 19 +++++++++--
src/backend/utils/misc/postgresql.conf.sample | 21 ++++++-------
4 files changed, 51 insertions(+), 45 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow setting client_min_messages higher than ERROR.
@ 2018-11-08 22:34  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-11-08 22:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2407d4807fdc1d536fb27ac8c38cfa0e21be4eba

Modified Files
--------------
doc/src/sgml/config.sgml                      | 45 +++++++++++++--------------
src/backend/utils/error/elog.c                | 11 ++-----
src/backend/utils/misc/guc.c                  | 19 +++++++++--
src/backend/utils/misc/postgresql.conf.sample | 21 ++++++-------
4 files changed, 51 insertions(+), 45 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow setting client_min_messages higher than ERROR.
@ 2018-11-08 22:34  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-11-08 22:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7b08b4a8adbbc5a5b022e9dd6e658d03ceb31afd

Modified Files
--------------
doc/src/sgml/config.sgml                      | 45 +++++++++++++--------------
src/backend/utils/error/elog.c                | 11 ++-----
src/backend/utils/misc/guc.c                  | 19 +++++++++--
src/backend/utils/misc/postgresql.conf.sample | 21 ++++++-------
4 files changed, 51 insertions(+), 45 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow setting client_min_messages higher than ERROR.
@ 2018-11-08 22:34  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-11-08 22:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/88275ac1990090e848ebd4f4bbd4004826fd253a

Modified Files
--------------
doc/src/sgml/config.sgml                      | 45 +++++++++++++--------------
src/backend/utils/error/elog.c                | 11 ++-----
src/backend/utils/misc/guc.c                  | 19 +++++++++--
src/backend/utils/misc/postgresql.conf.sample | 21 ++++++-------
4 files changed, 51 insertions(+), 45 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Disallow setting client_min_messages higher than ERROR.
@ 2018-11-08 22:34  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2018-11-08 22:34 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/041ad9a66d28c3106a8bba79d94af447efc60347

Modified Files
--------------
doc/src/sgml/config.sgml                      | 45 +++++++++++++--------------
src/backend/utils/error/elog.c                | 11 ++-----
src/backend/utils/misc/guc.c                  | 19 +++++++++--
src/backend/utils/misc/postgresql.conf.sample | 21 ++++++-------
4 files changed, 51 insertions(+), 45 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2018-11-08 22:34 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08 22:34 pgsql: Disallow setting client_min_messages higher than ERROR. Tom Lane <tgl@sss.pgh.pa.us>
2018-11-08 22:34 pgsql: Disallow setting client_min_messages higher than ERROR. Tom Lane <tgl@sss.pgh.pa.us>
2018-11-08 22:34 pgsql: Disallow setting client_min_messages higher than ERROR. Tom Lane <tgl@sss.pgh.pa.us>
2018-11-08 22:34 pgsql: Disallow setting client_min_messages higher than ERROR. Tom Lane <tgl@sss.pgh.pa.us>
2018-11-08 22:34 pgsql: Disallow setting client_min_messages higher than ERROR. Tom Lane <tgl@sss.pgh.pa.us>
2018-11-08 22:34 pgsql: Disallow setting client_min_messages higher than ERROR. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox