log_min_messages shows debug instead of debug2

From: "Ideriha, Takeshi" <ideriha(dot)takeshi(at)jp(dot)fujitsu(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: log_min_messages shows debug instead of debug2
Date: 2018-05-15 08:46:12
Message-ID: 4E72940DA2BF16479384A86D54D0988A5678EC03@G01JPEXMBKW04
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Hi,

I noticed that if log_min_messages is set to ‘debug2’, it shows ‘debug’ instead of debug2.
Showing other debug options like debug1 work normally.
This is same for client_min_messages.

According to a033daf56 and baaad2330, debug is an alias for debug2 and for backward-compatibility.
And also these debug options are mainly used for PostgreSQL hackers, so I think this is a trivial issue.

Patch attached.
The output of ‘show log_min_messages’ becomes ‘debug2’ if it’s set to either debug or debug2.
It passed make installcheck.

I just changed the order of server_message_level_options[]
because in this case SHOW command linearly searches GUC option by config_enum_lookup_by_value().

What do you think about it?
If it’s worth committing, do I need test? I couldn’t find the relevant test set.

====================
Takeshi Ideriha
Fujitsu Limited

Attachment Content-Type Size
debug2_log_level.patch application/octet-stream 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Maxim Boguk 2018-05-15 09:06:38 Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Previous Message Amit Kapila 2018-05-15 07:34:55 Re: Postgres 11 release notes