On Fri, Jul 04, 2025 at 11:30:17AM -0400, Tom Lane wrote: > As I remarked in the other thread, I don't like inventing a different > solution for each GUC. So if there are even two that need something > done, I think Hayato-san's idea has merit. > > + /* > + * Certain GUCs aren't safe to enable during bootstrap mode. Silently > + * ignore attempts to set them to non-default values. > + */ > + if (unlikely(IsBootstrapProcessingMode()) && > + (record->flags & GUC_IGNORE_IN_BOOTSTRAP) && > + source != PGC_S_DEFAULT) > + changeVal = false; > + > /* > * Check if the option can be set at this time. See guc.h for the > precise > * rules.
This is assuming that the default value assigned to a GUC will always take the right decision in the bootstrap case, which is perhaps OK anyway in most cases, or we would know about that during initdb. I'd be OK with something among these lines, yes. I have doubts if we can really safely place the initial GUC loading to happen after the postmaster is switched to bootstrap mode, and if it's a viable strategy in the long-term.. > If we went this way, we'd presumably revert 5a6c39b6d in favor > of marking track_commit_timestamp with this flag. Makes sense, on HEAD. -- Michael
signature.asc
Description: PGP signature