Re: GUC values - recommended way to declare the C variables?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: GUC values - recommended way to declare the C variables?
Дата
Msg-id Y19W+XIIz7Z1iHzZ@paquier.xyz
обсуждение исходный текст
Ответ на Re: GUC values - recommended way to declare the C variables?  (Peter Smith <smithpb2250@gmail.com>)
Ответы Re: GUC values - recommended way to declare the C variables?  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
On Mon, Oct 31, 2022 at 12:01:33PM +1100, Peter Smith wrote:
> SUGGESTION
> /* Only applicable when prefetching is available */

Thanks for the suggestion.  Done this way, then.

> +/* Disabled on Windows as the performance overhead can be significant */
> +#ifdef WIN32
> +#define DEFAULT_UPDATE_PROCESS_TITLE false
> +#else
> +#define DEFAULT_UPDATE_PROCESS_TITLE true
> +#endif
>  extern PGDLLIMPORT bool update_process_title;
>
> Perhaps put that comment inside the #ifdef WIN32

I'd keep that externally, as ps_status.h does so.

> [...]
> SUGGESTION
> /* Check the GUC default and declared initial value for consistency */

Okay, fine by me.

I have split the change into two parts at the end: one to refactor and
fix the C declarations, and a second to introduce the check routine
with all the correct declarations in place.

FWIW, I have been testing that with my own in-house modules and it has
caught a few stupid inconsistencies.  Let's see how it goes.
--
Michael

Вложения

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

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: pg15 inherited stats expressions: cache lookup failed for statistics object
Следующее
От: Richard Guo
Дата:
Сообщение: Re: pg15 inherited stats expressions: cache lookup failed for statistics object