Peter Smith <smithpb2...@gmail.com> 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