PSA v2* patches.
Patch 0001 is just a minor tidy of the GUC C variables of logical
replication. The C variable initial values are present again, how
Michael preferred them [1].
Patch 0002 adds a sanity-check function called by
InitializeGUCOptions, as suggested by Tom [2]. This is to ensure that
the GUC C variable initial values are sensible and/or have not gone
stale compared with the compiled-in defaults of guc_tables.c. This
patch also changes some GUC C variable initial values which were
already found (by this sanity-checker) to be different.
~~~
FYI, here are examples of errors when (contrived) mismatched values
are detected:
[postgres@CentOS7-x64 ~]$ pg_ctl -D ./MYDATAOSS/ start
waiting for server to start....FATAL: GUC (PGC_INT)
max_replication_slots, boot_val=10, C-var=999
stopped waiting
pg_ctl: could not start server
Examine the log output.
[postgres@CentOS7-x64 ~]$ pg_ctl -D ./MYDATAOSS/ start
waiting for server to start....FATAL: GUC (PGC_BOOL)
enable_partitionwise_aggregate, boot_val=0, C-var=1
stopped waiting
pg_ctl: could not start server
Examine the log output.
[postgres@CentOS7-x64 ~]$ pg_ctl -D ./MYDATAOSS/ start
waiting for server to start....FATAL: GUC (PGC_REAL)
cpu_operator_cost, boot_val=0.0025, C-var=99.99
stopped waiting
pg_ctl: could not start server
Examine the log output.
[postgres@CentOS7-x64 ~]$ pg_ctl -D ./MYDATAOSS/ start
waiting for server to start....FATAL: GUC (PGC_STRING)
archive_command, boot_val=, C-var=banana
stopped waiting
pg_ctl: could not start server
Examine the log output.
[postgres@CentOS7-x64 ~]$ pg_ctl -D ./MYDATAOSS/ start
waiting for server to start....FATAL: GUC (PGC_ENUM) wal_level,
boot_val=1, C-var=99
stopped waiting
pg_ctl: could not start server
Examine the log output.
------
[1] prefer to have C initial values -
https://www.postgresql.org/message-id/Y0dgHfEGvvay5nle%40paquier.xyz
[2] sanity-check idea -
https://www.postgresql.org/message-id/1113448.1665717297%40sss.pgh.pa.us
Kind Regards,
Peter Smith.
Fujitsu Australia