Re: Add parameter jit_warn_above_fraction

Поиск
Список
Период
Сортировка
От Julien Rouhaud
Тема Re: Add parameter jit_warn_above_fraction
Дата
Msg-id 20220225160141.k35qjyysclouw5xc@jrouhaud
обсуждение исходный текст
Ответ на Add parameter jit_warn_above_fraction  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
Hi,

On Fri, Feb 25, 2022 at 04:16:01PM +0100, Magnus Hagander wrote:
> This patch adds a configuration parameter jit_warn_above_fraction that
> will cause a warning to be logged if the fraction of time spent on
> doing JIT is bigger than the specified one. For example, this can be
> used to track down those cases where JIT ends up taking 90% of the
> query runtime because of bad estimates...

I think that's tremendously useful, huge +1.

Just a few minor nit:

+         A value of 0 (the default)disables the warning.

missing space

+            ereport(WARNING,
+                    (errmsg("JIT time was %ld ms of %d ms",
+                            jit_time, msecs)));

"JIT time" may a bit obscure for users, how about "JIT total processing time"?"

+            gettext_noop("Sets the fraction of query time spent on JIT before writing"
+                         "a warning to the log."),
+            gettext_noop("Write a message tot he server log if more than this"
+                         "fraction of the query runtime is spent on JIT."
+                         "Zero turns off the warning.")

missing spaces in the concatenated strings.

The rest of the patch looks good to me.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Expose JIT counters/timing in pg_stat_statements
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Add parameter jit_warn_above_fraction