Re: Reorganize GUC structs

John Naylor <johncnaylorls@gmail.com>

From: John Naylor <johncnaylorls@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-13T09:59:36Z
Lists: pgsql-hackers
On Fri, Oct 3, 2025 at 1:55 PM Peter Eisentraut <peter@eisentraut.org> wrote:
> Additionally, I have sorted guc_parameters.dat alphabetically by name,
> and have added code to enforce the sort order going forward.  (Note: The

That makes sense by default. Another possibility would be to keep them
in the same order as postgresql.conf.sample. You mentioned earlier it
may be possible to generate the latter, although it's not yet clear if
that could be done easily. If not, then keeping them in sync would be
extra work.

--
John Naylor
Amazon Web Services



Commits

  1. Remove extraneous newlines from guc_parameters.dat

  2. Fix NLS for incorrect GUC enum value hint message

  3. Clean up qsort comparison function for GUC entries

  4. Sort guc_parameters.dat alphabetically by name

  5. Reorganize GUC structs

  6. Change config_generic.vartype to be initialized at compile time

  7. Use designated initializers for guc_tables

  8. Change reset_extra into a config_generic common field

  9. Add some const qualifiers

  10. Modernize some for loops