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

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: GUC values - recommended way to declare the C variables?
Дата
Msg-id
1113448.1665717297@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
GUC values - recommended way to declare the C variables? Peter Smith <smithpb2250@gmail.com>
Re: GUC values - recommended way to declare the C variables? Tom Lane <tgl@sss.pgh.pa.us>
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>
Re: GUC values - recommended way to declare the C variables? Nathan Bossart <nathandbossart@gmail.com>
Re: GUC values - recommended way to declare the C variables? Michael Paquier <michael@paquier.xyz>
Re: GUC values - recommended way to declare the C variables? Nathan Bossart <nathandbossart@gmail.com>
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? Tom Lane <tgl@sss.pgh.pa.us>
Re: GUC values - recommended way to declare the C variables? Michael Paquier <michael@paquier.xyz>
Re: GUC values - recommended way to declare the C variables? Tom Lane <tgl@sss.pgh.pa.us>
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? Justin Pryzby <pryzby@telsasoft.com>
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>
Re: GUC values - recommended way to declare the C variables? Michael Paquier <michael@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? Justin Pryzby <pryzby@telsasoft.com>
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? Michael Paquier <michael@paquier.xyz>
Re: GUC values - recommended way to declare the C variables? Justin Pryzby <pryzby@telsasoft.com>
Re: GUC values - recommended way to declare the C variables? Michael Paquier <michael@paquier.xyz>
Re: GUC values - recommended way to declare the C variables? Justin Pryzby <pryzby@telsasoft.com>
Re: GUC values - recommended way to declare the C variables? Michael Paquier <michael@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>
Re: GUC values - recommended way to declare the C variables? Michael Paquier <michael@paquier.xyz>
Re: GUC values - recommended way to declare the C variables? Michael Paquier <michael@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? Michael Paquier <michael@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? Michael Paquier <michael@paquier.xyz>
Peter Smith  writes:
> I agree if constants are used in both places then there will always be
> some risk they can get out of sync again.

Yeah.

> But probably it is no problem to just add #defines (e.g. in
> logicallauncher.h?) to be commonly used for the C variable declaration
> and also in the guc_tables.

The problem is exactly that there's no great place to put those #define's,
at least not without incurring a lot of fresh #include bloat.

Also, if you did it like that, then it doesn't really address Michael's
desire to see the default value in the variable declaration.

I do lean towards having the data available, mainly because of the
fear I mentioned upthread that some GUCs may be accessed before
InitializeGUCOptions runs.

Could we fix the out-of-sync risk by having InitializeGUCOptions insist
that the pre-existing value of the variable match what is in guc_tables.c?
That may not work for string values but I think we could insist on it
for other GUC data types.  For strings, maybe the rule could be "the
old value must be NULL or strcmp-equal to the boot_val".

			regards, tom lane


В списке pgsql-hackers по дате отправления
От: bt22nakamorit
Дата:
От: shiy.fnst@fujitsu.com
Дата:
FAQ