From r.takahashi_2 @ jp.fujitsu.com Thu Oct 11 10:09:56 2018 From: r.takahashi_2 @ jp.fujitsu.com (Takahashi, Ryohei) Date: Thu, 11 Oct 2018 01:09:56 +0000 Subject: [Pghintplan-q_and_a] Problem in using pg_hint_plan.parse_messages Message-ID: Hi, Currently our customer uses PostgreSQL 9.5 and pg_hint_plan 1.1.3 and hits problem in using pg_hint_plan.parse_messages parameter. In pg_hint_plan.html and pg_hint_plan-ja.html, two parameters pg_hint_plan.parse_messages and pg_hint_plan.message_level are written as follows. pg_hint_plan 1.1.3 (for Postgres 9.5): pg_hint_plan.html: only pg_hint_plan.message_level is written. pg_hint_plan-ja.html: only pg_hint_plan.parse_messages is written. pg_hint_plan 1.2.3 and 1.3.1 (for Postgres 9.6 and 10): both two parameters are written. However, these two parameters are assigned to the same variable (parse_messages_level_options) as follows. pg_hint_plan.c DefineCustomEnumVariable("pg_hint_plan.parse_messages", "Message level of parse errors.", NULL, &pg_hint_plan_message_level, INFO, parse_messages_level_options, PGC_USERSET, 0, NULL, NULL, NULL); DefineCustomEnumVariable("pg_hint_plan.message_level", "Message level of debug messages.", NULL, &pg_hint_plan_message_level, INFO, parse_messages_level_options, PGC_USERSET, 0, NULL, NULL, NULL); Since two parameters are assigned to the same variable, pg_hint_plan.parse_messages is overwritten with pg_hint_plan.message_level when starting PostgreSQL. When my customer writes "pg_hint_plan.parse_messages = 'warning'" and does not write pg_hint_plan.message_level and starts PostgreSQL, both two parameters are shown as 'info' (default value of pg_hint_plan.message_level). Therefore, I propose to remove pg_hint_plan.parse_messages from pg_hint_plan.html and pg_hint_plan-ja.html. Regards, Ryohei Takahashi