Change ereport level for QueuePartitionConstraintValidation
Sergei Kornilov <sk@zsrv.org>
From: Sergei Kornilov <sk@zsrv.org>
To: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2019-03-15T09:55:36Z
Lists: pgsql-hackers
Attachments
- lowering_partition_constraint_check_ereport_level.patch (text/x-diff) patch
Hello
Per discussion started here: https://www.postgresql.org/message-id/CA%2BTgmoZWSLUjVcc9KBSVvbn%3DU5QRgW1O-MgUX0y5CnLZOA2qyQ%40mail.gmail.com
We have INFO ereport messages in alter table attach partition like this:
> partition constraint for table \"%s\" is implied by existing constraints
Personally I like this message and not want remove it.
But recently my colleague noticed that INFO level is written to stderr by psql. For example, simple command
> psql -c "alter table measurement attach partition measurement_y2006m04 for values from ('2006-04-01') to ('2006-05-01');"
can produce stderr output like error, but this is expected behavior from successful execution.
And INFO level always sent to client regardless of client_min_messages as clearly documented in src/include/utils/elog.h
So now I am +1 to idea of change error level for this messages. I attach patch to lower such ereport to DEBUG1 level
thanks
PS: possible we can change level to NOTICE but I doubt we will choose this way
regards, Sergei
Commits
-
Avoid using INFO elevel for what are fundamentally debug messages.
- db438318997b 13.0 landed
- 121e3ceed6d9 12.0 landed
-
Revert setting client_min_messages to 'debug1' in new tests.
- 5655565c077c 12.0 cited