From: | Anton Voloshin <a(dot)voloshin(at)postgrespro(dot)ru> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
Subject: | Re: missing warning in pg_import_system_collations |
Date: | 2021-09-09 15:17:35 |
Message-ID: | 2fee0074-8ae8-20bd-ad94-0b22dcd7585e@postgrespro.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 09/09/2021 21:51, Tom Lane wrote:
> What you propose to do here would promote this case from
> ought-to-be-DEBUG1 to WARNING, which seems to me to be way too much in the
> user's face. Or, if there actually is a case for complaining, then all
> those messages ought to be WARNING not DEBUG1. ...
>
> Assuming we don't want to change pg_get_encoding_from_locale()'s API,
> the simplest fix is to duplicate its error message, so more or less
>
> if (enc < 0)
> {
> - /* error message printed by pg_get_encoding_from_locale() */
> + elog(DEBUG1, "could not determine encoding for locale \"%s\"",
> + localebuf)));
> continue;
> }
Upon thinking a little more, I agree.
The warnings I happen to get from initdb on my current machine (with
many various locales installed, more than on a typical box) are:
performing post-bootstrap initialization ... 2021-09-09 22:04:01.678 +07
[482312] WARNING: could not determine encoding for locale
"hy_AM.armscii8": codeset is "ARMSCII-8"
2021-09-09 22:04:01.679 +07 [482312] WARNING: could not determine
encoding for locale "ka_GE": codeset is "GEORGIAN-PS"
2021-09-09 22:04:01.679 +07 [482312] WARNING: could not determine
encoding for locale "kk_KZ": codeset is "PT154"
2021-09-09 22:04:01.679 +07 [482312] WARNING: could not determine
encoding for locale "kk_KZ.rk1048": codeset is "RK1048"
2021-09-09 22:04:01.686 +07 [482312] WARNING: could not determine
encoding for locale "tg_TJ": codeset is "KOI8-T"
2021-09-09 22:04:01.686 +07 [482312] WARNING: could not determine
encoding for locale "th_TH": codeset is "TIS-620"
ok
While they are definitely interesting as DEBUG1, not so as a WARNING.
So, +1 from me for your proposed elog(DEBUG1, ...); patch. Thank you.
--
Anton Voloshin
Postgres Professional, The Russian Postgres Company
https://postgrespro.ru
From | Date | Subject | |
---|---|---|---|
Next Message | Jaime Casanova | 2021-09-09 15:38:33 | Re: Asymmetric partition-wise JOIN |
Previous Message | Fujii Masao | 2021-09-09 15:09:08 | Re: Possible missing segments in archiving on standby |