Change ereport level for QueuePartitionConstraintValidation

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Change ereport level for QueuePartitionConstraintValidation
Date: 2019-03-15 09:55:36
Message-ID: 4859321552643736@myt5-02b80404fd9e.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
lowering_partition_constraint_check_ereport_level.patch text/x-diff 6.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maxence Ahlouche 2019-03-15 09:57:24 Re: Show a human-readable n_distinct in pg_stats view
Previous Message Amit Kapila 2019-03-15 09:55:34 Re: WIP: Avoid creation of the free space map for small tables