Skip to content

Commit 2ae98ea

Browse files
Synchronize guc_tables.c categories with vacuum docs categories
ca9c6a5 consolidated most of the vacuum-related GUCs' documentation into a new subsection. af23176 then enforced this order in postgresql.conf.sample. This commit reorganizes the GUC groups in guc_tables.c/h to match the updated ordering in the docs. Reported-by: Álvaro Herrera Reviewed-by: Álvaro Herrera, Alena Rybakina Discussion: https://postgr.es/m/202501132046.m4mcvxxswznu%40alvherre.pgsql
1 parent 00f4c29 commit 2ae98ea

File tree

2 files changed

+31
-29
lines changed

2 files changed

+31
-29
lines changed

src/backend/utils/misc/guc_tables.c

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,6 @@ const char *const config_group_names[] =
681681
[RESOURCES_MEM] = gettext_noop("Resource Usage / Memory"),
682682
[RESOURCES_DISK] = gettext_noop("Resource Usage / Disk"),
683683
[RESOURCES_KERNEL] = gettext_noop("Resource Usage / Kernel Resources"),
684-
[RESOURCES_VACUUM_DELAY] = gettext_noop("Resource Usage / Cost-Based Vacuum Delay"),
685684
[RESOURCES_BGWRITER] = gettext_noop("Resource Usage / Background Writer"),
686685
[RESOURCES_ASYNCHRONOUS] = gettext_noop("Resource Usage / Asynchronous Behavior"),
687686
[WAL_SETTINGS] = gettext_noop("Write-Ahead Log / Settings"),
@@ -705,7 +704,9 @@ const char *const config_group_names[] =
705704
[PROCESS_TITLE] = gettext_noop("Reporting and Logging / Process Title"),
706705
[STATS_MONITORING] = gettext_noop("Statistics / Monitoring"),
707706
[STATS_CUMULATIVE] = gettext_noop("Statistics / Cumulative Query and Index Statistics"),
708-
[AUTOVACUUM] = gettext_noop("Autovacuum"),
707+
[VACUUM_AUTOVACUUM] = gettext_noop("Vacuuming / Automatic Vacuuming"),
708+
[VACUUM_COST_DELAY] = gettext_noop("Vacuuming / Cost-Based Vacuum Delay"),
709+
[VACUUM_FREEZING] = gettext_noop("Vacuuming / Freezing"),
709710
[CLIENT_CONN_STATEMENT] = gettext_noop("Client Connection Defaults / Statement Behavior"),
710711
[CLIENT_CONN_LOCALE] = gettext_noop("Client Connection Defaults / Locale and Formatting"),
711712
[CLIENT_CONN_PRELOAD] = gettext_noop("Client Connection Defaults / Shared Library Preloading"),
@@ -1499,7 +1500,7 @@ struct config_bool ConfigureNamesBool[] =
14991500
},
15001501

15011502
{
1502-
{"autovacuum", PGC_SIGHUP, AUTOVACUUM,
1503+
{"autovacuum", PGC_SIGHUP, VACUUM_AUTOVACUUM,
15031504
gettext_noop("Starts the autovacuum subprocess."),
15041505
NULL
15051506
},
@@ -2583,7 +2584,7 @@ struct config_int ConfigureNamesInt[] =
25832584
},
25842585

25852586
{
2586-
{"vacuum_cost_page_hit", PGC_USERSET, RESOURCES_VACUUM_DELAY,
2587+
{"vacuum_cost_page_hit", PGC_USERSET, VACUUM_COST_DELAY,
25872588
gettext_noop("Vacuum cost for a page found in the buffer cache."),
25882589
NULL
25892590
},
@@ -2593,7 +2594,7 @@ struct config_int ConfigureNamesInt[] =
25932594
},
25942595

25952596
{
2596-
{"vacuum_cost_page_miss", PGC_USERSET, RESOURCES_VACUUM_DELAY,
2597+
{"vacuum_cost_page_miss", PGC_USERSET, VACUUM_COST_DELAY,
25972598
gettext_noop("Vacuum cost for a page not found in the buffer cache."),
25982599
NULL
25992600
},
@@ -2603,7 +2604,7 @@ struct config_int ConfigureNamesInt[] =
26032604
},
26042605

26052606
{
2606-
{"vacuum_cost_page_dirty", PGC_USERSET, RESOURCES_VACUUM_DELAY,
2607+
{"vacuum_cost_page_dirty", PGC_USERSET, VACUUM_COST_DELAY,
26072608
gettext_noop("Vacuum cost for a page dirtied by vacuum."),
26082609
NULL
26092610
},
@@ -2613,7 +2614,7 @@ struct config_int ConfigureNamesInt[] =
26132614
},
26142615

26152616
{
2616-
{"vacuum_cost_limit", PGC_USERSET, RESOURCES_VACUUM_DELAY,
2617+
{"vacuum_cost_limit", PGC_USERSET, VACUUM_COST_DELAY,
26172618
gettext_noop("Vacuum cost amount available before napping."),
26182619
NULL
26192620
},
@@ -2623,7 +2624,7 @@ struct config_int ConfigureNamesInt[] =
26232624
},
26242625

26252626
{
2626-
{"autovacuum_vacuum_cost_limit", PGC_SIGHUP, AUTOVACUUM,
2627+
{"autovacuum_vacuum_cost_limit", PGC_SIGHUP, VACUUM_AUTOVACUUM,
26272628
gettext_noop("Vacuum cost amount available before napping, for autovacuum."),
26282629
NULL
26292630
},
@@ -2734,7 +2735,7 @@ struct config_int ConfigureNamesInt[] =
27342735
},
27352736

27362737
{
2737-
{"vacuum_freeze_min_age", PGC_USERSET, CLIENT_CONN_STATEMENT,
2738+
{"vacuum_freeze_min_age", PGC_USERSET, VACUUM_FREEZING,
27382739
gettext_noop("Minimum age at which VACUUM should freeze a table row."),
27392740
NULL
27402741
},
@@ -2744,7 +2745,7 @@ struct config_int ConfigureNamesInt[] =
27442745
},
27452746

27462747
{
2747-
{"vacuum_freeze_table_age", PGC_USERSET, CLIENT_CONN_STATEMENT,
2748+
{"vacuum_freeze_table_age", PGC_USERSET, VACUUM_FREEZING,
27482749
gettext_noop("Age at which VACUUM should scan whole table to freeze tuples."),
27492750
NULL
27502751
},
@@ -2754,7 +2755,7 @@ struct config_int ConfigureNamesInt[] =
27542755
},
27552756

27562757
{
2757-
{"vacuum_multixact_freeze_min_age", PGC_USERSET, CLIENT_CONN_STATEMENT,
2758+
{"vacuum_multixact_freeze_min_age", PGC_USERSET, VACUUM_FREEZING,
27582759
gettext_noop("Minimum age at which VACUUM should freeze a MultiXactId in a table row."),
27592760
NULL
27602761
},
@@ -2764,7 +2765,7 @@ struct config_int ConfigureNamesInt[] =
27642765
},
27652766

27662767
{
2767-
{"vacuum_multixact_freeze_table_age", PGC_USERSET, CLIENT_CONN_STATEMENT,
2768+
{"vacuum_multixact_freeze_table_age", PGC_USERSET, VACUUM_FREEZING,
27682769
gettext_noop("Multixact age at which VACUUM should scan whole table to freeze tuples."),
27692770
NULL
27702771
},
@@ -2774,7 +2775,7 @@ struct config_int ConfigureNamesInt[] =
27742775
},
27752776

27762777
{
2777-
{"vacuum_failsafe_age", PGC_USERSET, CLIENT_CONN_STATEMENT,
2778+
{"vacuum_failsafe_age", PGC_USERSET, VACUUM_FREEZING,
27782779
gettext_noop("Age at which VACUUM should trigger failsafe to avoid a wraparound outage."),
27792780
NULL
27802781
},
@@ -2783,7 +2784,7 @@ struct config_int ConfigureNamesInt[] =
27832784
NULL, NULL, NULL
27842785
},
27852786
{
2786-
{"vacuum_multixact_failsafe_age", PGC_USERSET, CLIENT_CONN_STATEMENT,
2787+
{"vacuum_multixact_failsafe_age", PGC_USERSET, VACUUM_FREEZING,
27872788
gettext_noop("Multixact age at which VACUUM should trigger failsafe to avoid a wraparound outage."),
27882789
NULL
27892790
},
@@ -3407,7 +3408,7 @@ struct config_int ConfigureNamesInt[] =
34073408
},
34083409

34093410
{
3410-
{"autovacuum_naptime", PGC_SIGHUP, AUTOVACUUM,
3411+
{"autovacuum_naptime", PGC_SIGHUP, VACUUM_AUTOVACUUM,
34113412
gettext_noop("Time to sleep between autovacuum runs."),
34123413
NULL,
34133414
GUC_UNIT_S
@@ -3417,7 +3418,7 @@ struct config_int ConfigureNamesInt[] =
34173418
NULL, NULL, NULL
34183419
},
34193420
{
3420-
{"autovacuum_vacuum_threshold", PGC_SIGHUP, AUTOVACUUM,
3421+
{"autovacuum_vacuum_threshold", PGC_SIGHUP, VACUUM_AUTOVACUUM,
34213422
gettext_noop("Minimum number of tuple updates or deletes prior to vacuum."),
34223423
NULL
34233424
},
@@ -3426,7 +3427,7 @@ struct config_int ConfigureNamesInt[] =
34263427
NULL, NULL, NULL
34273428
},
34283429
{
3429-
{"autovacuum_vacuum_insert_threshold", PGC_SIGHUP, AUTOVACUUM,
3430+
{"autovacuum_vacuum_insert_threshold", PGC_SIGHUP, VACUUM_AUTOVACUUM,
34303431
gettext_noop("Minimum number of tuple inserts prior to vacuum, or -1 to disable insert vacuums."),
34313432
NULL
34323433
},
@@ -3435,7 +3436,7 @@ struct config_int ConfigureNamesInt[] =
34353436
NULL, NULL, NULL
34363437
},
34373438
{
3438-
{"autovacuum_analyze_threshold", PGC_SIGHUP, AUTOVACUUM,
3439+
{"autovacuum_analyze_threshold", PGC_SIGHUP, VACUUM_AUTOVACUUM,
34393440
gettext_noop("Minimum number of tuple inserts, updates, or deletes prior to analyze."),
34403441
NULL
34413442
},
@@ -3445,7 +3446,7 @@ struct config_int ConfigureNamesInt[] =
34453446
},
34463447
{
34473448
/* see varsup.c for why this is PGC_POSTMASTER not PGC_SIGHUP */
3448-
{"autovacuum_freeze_max_age", PGC_POSTMASTER, AUTOVACUUM,
3449+
{"autovacuum_freeze_max_age", PGC_POSTMASTER, VACUUM_AUTOVACUUM,
34493450
gettext_noop("Age at which to autovacuum a table to prevent transaction ID wraparound."),
34503451
NULL
34513452
},
@@ -3457,7 +3458,7 @@ struct config_int ConfigureNamesInt[] =
34573458
},
34583459
{
34593460
/* see multixact.c for why this is PGC_POSTMASTER not PGC_SIGHUP */
3460-
{"autovacuum_multixact_freeze_max_age", PGC_POSTMASTER, AUTOVACUUM,
3461+
{"autovacuum_multixact_freeze_max_age", PGC_POSTMASTER, VACUUM_AUTOVACUUM,
34613462
gettext_noop("Multixact age at which to autovacuum a table to prevent multixact wraparound."),
34623463
NULL
34633464
},
@@ -3467,7 +3468,7 @@ struct config_int ConfigureNamesInt[] =
34673468
},
34683469
{
34693470
/* see max_connections */
3470-
{"autovacuum_worker_slots", PGC_POSTMASTER, AUTOVACUUM,
3471+
{"autovacuum_worker_slots", PGC_POSTMASTER, VACUUM_AUTOVACUUM,
34713472
gettext_noop("Sets the number of backend slots to allocate for autovacuum workers."),
34723473
NULL
34733474
},
@@ -3476,7 +3477,7 @@ struct config_int ConfigureNamesInt[] =
34763477
NULL, NULL, NULL
34773478
},
34783479
{
3479-
{"autovacuum_max_workers", PGC_SIGHUP, AUTOVACUUM,
3480+
{"autovacuum_max_workers", PGC_SIGHUP, VACUUM_AUTOVACUUM,
34803481
gettext_noop("Sets the maximum number of simultaneously running autovacuum worker processes."),
34813482
NULL
34823483
},
@@ -3941,7 +3942,7 @@ struct config_real ConfigureNamesReal[] =
39413942
},
39423943

39433944
{
3944-
{"vacuum_cost_delay", PGC_USERSET, RESOURCES_VACUUM_DELAY,
3945+
{"vacuum_cost_delay", PGC_USERSET, VACUUM_COST_DELAY,
39453946
gettext_noop("Vacuum cost delay in milliseconds."),
39463947
NULL,
39473948
GUC_UNIT_MS
@@ -3952,7 +3953,7 @@ struct config_real ConfigureNamesReal[] =
39523953
},
39533954

39543955
{
3955-
{"autovacuum_vacuum_cost_delay", PGC_SIGHUP, AUTOVACUUM,
3956+
{"autovacuum_vacuum_cost_delay", PGC_SIGHUP, VACUUM_AUTOVACUUM,
39563957
gettext_noop("Vacuum cost delay in milliseconds, for autovacuum."),
39573958
NULL,
39583959
GUC_UNIT_MS
@@ -3963,7 +3964,7 @@ struct config_real ConfigureNamesReal[] =
39633964
},
39643965

39653966
{
3966-
{"autovacuum_vacuum_scale_factor", PGC_SIGHUP, AUTOVACUUM,
3967+
{"autovacuum_vacuum_scale_factor", PGC_SIGHUP, VACUUM_AUTOVACUUM,
39673968
gettext_noop("Number of tuple updates or deletes prior to vacuum as a fraction of reltuples."),
39683969
NULL
39693970
},
@@ -3973,7 +3974,7 @@ struct config_real ConfigureNamesReal[] =
39733974
},
39743975

39753976
{
3976-
{"autovacuum_vacuum_insert_scale_factor", PGC_SIGHUP, AUTOVACUUM,
3977+
{"autovacuum_vacuum_insert_scale_factor", PGC_SIGHUP, VACUUM_AUTOVACUUM,
39773978
gettext_noop("Number of tuple inserts prior to vacuum as a fraction of reltuples."),
39783979
NULL
39793980
},
@@ -3983,7 +3984,7 @@ struct config_real ConfigureNamesReal[] =
39833984
},
39843985

39853986
{
3986-
{"autovacuum_analyze_scale_factor", PGC_SIGHUP, AUTOVACUUM,
3987+
{"autovacuum_analyze_scale_factor", PGC_SIGHUP, VACUUM_AUTOVACUUM,
39873988
gettext_noop("Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples."),
39883989
NULL
39893990
},

src/include/utils/guc_tables.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ enum config_group
6363
RESOURCES_MEM,
6464
RESOURCES_DISK,
6565
RESOURCES_KERNEL,
66-
RESOURCES_VACUUM_DELAY,
6766
RESOURCES_BGWRITER,
6867
RESOURCES_ASYNCHRONOUS,
6968
WAL_SETTINGS,
@@ -87,7 +86,9 @@ enum config_group
8786
PROCESS_TITLE,
8887
STATS_MONITORING,
8988
STATS_CUMULATIVE,
90-
AUTOVACUUM,
89+
VACUUM_AUTOVACUUM,
90+
VACUUM_COST_DELAY,
91+
VACUUM_FREEZING,
9192
CLIENT_CONN_STATEMENT,
9293
CLIENT_CONN_LOCALE,
9394
CLIENT_CONN_PRELOAD,

0 commit comments

Comments
 (0)