spg-engine 7.38.20

Execution engine for SPG: glues spg-sql parsing to spg-storage. Foreign keys, joins, vectors, cold tier.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
//! v7.39 (round 501) — PG18's configuration-parameter names and the
//! context each one may be changed in.
//!
//! v7.38.18 — this WAS a validation list and not a reporting list, and
//! that split had SPG answering the same question three different ways.
//! Measured, for `archive_command`, on one session:
//!
//!   SHOW archive_command                       -> '' (it exists)
//!   SET archive_command = 'x'                  -> cannot be changed now
//!   pg_settings WHERE name='archive_command'   -> 0 rows (it does not)
//!
//! Round 474's argument was that reporting a knob tells a tuning tool
//! that turning it does something. But `SHOW` was already reporting it
//! and `SET` was already answering for it, so the row's absence made
//! `pg_settings` the odd one out rather than the careful one — and a
//! tool that enumerates settings saw 31 where PG18 has 398. The comment
//! in `execute.rs` even claimed the two could "never disagree on which
//! params exist", which was false for 367 names.
//!
//! So this table now carries what a report needs — context, boot value,
//! vartype, category, unit — read from a live PG 18.4, and both surfaces
//! read it. What SPG actually implements is still a separate and
//! smaller list (`canonical_gucs`), which keeps its own values and wins
//! where the two overlap; the difference is visible in `source`.
//!
//! Contexts, and what PG does when a session tries to SET one:
//!   user / superuser / backend / superuser-backend  — allowed
//!   sighup      — `parameter "x" cannot be changed now`
//!   postmaster  — `parameter "x" cannot be changed without restarting the server`
//!   internal    — `parameter "x" cannot be changed`
//!
//! Extracted from a live PG 18 (`select name, vartype, context from
//! pg_settings`), 398 rows: user 151, sighup 104, postmaster 69, superuser 48, internal 20, superuser-backend 4, backend 2.

/// `(name, context)` for every PG18 configuration parameter.
///
/// Names are LOWERCASED and sorted that way: PG spells a few of them in
/// mixed case (`TimeZone`, `DateStyle`, `IntervalStyle`) while matching
/// case-insensitively, and a table sorted by the raw spelling cannot be
/// binary-searched with a lowercased key — the timezone tests caught
/// exactly that.
pub(crate) const PG_GUC_CONTEXTS: &[(&str, &str, &str, &str, &str, &str, &str, &str)] = &[
    (
        "allow_alter_system",
        "sighup",
        "on",
        "bool",
        "Version and Platform Compatibility / Other Platforms and Clients",
        "",
        "on",
        "Allows running the ALTER SYSTEM command.",
    ),
    (
        "allow_in_place_tablespaces",
        "superuser",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Allows tablespaces directly inside pg_tblspc, for testing.",
    ),
    (
        "allow_system_table_mods",
        "superuser",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Allows modifications of the structure of system tables.",
    ),
    (
        "application_name",
        "user",
        "",
        "string",
        "Reporting and Logging / What to Log",
        "",
        "",
        "Sets the application name to be reported in statistics and logs.",
    ),
    (
        "archive_cleanup_command",
        "sighup",
        "",
        "string",
        "Write-Ahead Log / Archive Recovery",
        "",
        "",
        "Sets the shell command that will be executed at every restart point.",
    ),
    (
        "archive_command",
        "sighup",
        "",
        "string",
        "Write-Ahead Log / Archiving",
        "",
        "",
        "Sets the shell command that will be called to archive a WAL file.",
    ),
    (
        "archive_library",
        "sighup",
        "",
        "string",
        "Write-Ahead Log / Archiving",
        "",
        "",
        "Sets the library that will be called to archive a WAL file.",
    ),
    (
        "archive_mode",
        "postmaster",
        "off",
        "enum",
        "Write-Ahead Log / Archiving",
        "",
        "off",
        "Allows archiving of WAL files using \"archive_command\".",
    ),
    (
        "archive_timeout",
        "sighup",
        "0",
        "integer",
        "Write-Ahead Log / Archiving",
        "s",
        "0",
        "Sets the amount of time to wait before forcing a switch to the next WAL file.",
    ),
    (
        "array_nulls",
        "user",
        "on",
        "bool",
        "Version and Platform Compatibility / Previous PostgreSQL Versions",
        "",
        "on",
        "Enables input of NULL elements in arrays.",
    ),
    (
        "authentication_timeout",
        "sighup",
        "1min",
        "integer",
        "Connections and Authentication / Authentication",
        "s",
        "60",
        "Sets the maximum allowed time to complete client authentication.",
    ),
    (
        "autovacuum",
        "sighup",
        "on",
        "bool",
        "Vacuuming / Automatic Vacuuming",
        "",
        "on",
        "Starts the autovacuum subprocess.",
    ),
    (
        "autovacuum_analyze_scale_factor",
        "sighup",
        "0.1",
        "real",
        "Vacuuming / Automatic Vacuuming",
        "",
        "0.1",
        "Number of tuple inserts, updates, or deletes prior to analyze as a fraction of reltuples.",
    ),
    (
        "autovacuum_analyze_threshold",
        "sighup",
        "50",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "",
        "50",
        "Minimum number of tuple inserts, updates, or deletes prior to analyze.",
    ),
    (
        "autovacuum_freeze_max_age",
        "postmaster",
        "200000000",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "",
        "200000000",
        "Age at which to autovacuum a table to prevent transaction ID wraparound.",
    ),
    (
        "autovacuum_max_workers",
        "sighup",
        "3",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "",
        "3",
        "Sets the maximum number of simultaneously running autovacuum worker processes.",
    ),
    (
        "autovacuum_multixact_freeze_max_age",
        "postmaster",
        "400000000",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "",
        "400000000",
        "Multixact age at which to autovacuum a table to prevent multixact wraparound.",
    ),
    (
        "autovacuum_naptime",
        "sighup",
        "1min",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "s",
        "60",
        "Time to sleep between autovacuum runs.",
    ),
    (
        "autovacuum_vacuum_cost_delay",
        "sighup",
        "2ms",
        "real",
        "Vacuuming / Automatic Vacuuming",
        "ms",
        "2",
        "Vacuum cost delay in milliseconds, for autovacuum.",
    ),
    (
        "autovacuum_vacuum_cost_limit",
        "sighup",
        "-1",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "",
        "-1",
        "Vacuum cost amount available before napping, for autovacuum.",
    ),
    (
        "autovacuum_vacuum_insert_scale_factor",
        "sighup",
        "0.2",
        "real",
        "Vacuuming / Automatic Vacuuming",
        "",
        "0.2",
        "Number of tuple inserts prior to vacuum as a fraction of reltuples.",
    ),
    (
        "autovacuum_vacuum_insert_threshold",
        "sighup",
        "1000",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "",
        "1000",
        "Minimum number of tuple inserts prior to vacuum.",
    ),
    (
        "autovacuum_vacuum_max_threshold",
        "sighup",
        "100000000",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "",
        "100000000",
        "Maximum number of tuple updates or deletes prior to vacuum.",
    ),
    (
        "autovacuum_vacuum_scale_factor",
        "sighup",
        "0.2",
        "real",
        "Vacuuming / Automatic Vacuuming",
        "",
        "0.2",
        "Number of tuple updates or deletes prior to vacuum as a fraction of reltuples.",
    ),
    (
        "autovacuum_vacuum_threshold",
        "sighup",
        "50",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "",
        "50",
        "Minimum number of tuple updates or deletes prior to vacuum.",
    ),
    (
        "autovacuum_work_mem",
        "sighup",
        "-1",
        "integer",
        "Resource Usage / Memory",
        "kB",
        "-1",
        "Sets the maximum memory to be used by each autovacuum worker process.",
    ),
    (
        "autovacuum_worker_slots",
        "postmaster",
        "16",
        "integer",
        "Vacuuming / Automatic Vacuuming",
        "",
        "16",
        "Sets the number of backend slots to allocate for autovacuum workers.",
    ),
    (
        "backend_flush_after",
        "user",
        "0",
        "integer",
        "Resource Usage / I/O",
        "8kB",
        "0",
        "Number of pages after which previously performed writes are flushed to disk.",
    ),
    (
        "backslash_quote",
        "user",
        "safe_encoding",
        "enum",
        "Version and Platform Compatibility / Previous PostgreSQL Versions",
        "",
        "safe_encoding",
        "Sets whether \"\\'\" is allowed in string literals.",
    ),
    (
        "backtrace_functions",
        "superuser",
        "",
        "string",
        "Developer Options",
        "",
        "",
        "Log backtrace for errors in these functions.",
    ),
    (
        "bgwriter_delay",
        "sighup",
        "200ms",
        "integer",
        "Resource Usage / Background Writer",
        "ms",
        "200",
        "Background writer sleep time between rounds.",
    ),
    (
        "bgwriter_flush_after",
        "sighup",
        "512kB",
        "integer",
        "Resource Usage / Background Writer",
        "8kB",
        "64",
        "Number of pages after which previously performed writes are flushed to disk.",
    ),
    (
        "bgwriter_lru_maxpages",
        "sighup",
        "100",
        "integer",
        "Resource Usage / Background Writer",
        "",
        "100",
        "Background writer maximum number of LRU pages to flush per round.",
    ),
    (
        "bgwriter_lru_multiplier",
        "sighup",
        "2",
        "real",
        "Resource Usage / Background Writer",
        "",
        "2",
        "Multiple of the average buffer usage to free per round.",
    ),
    (
        "block_size",
        "internal",
        "8192",
        "integer",
        "Preset Options",
        "",
        "8192",
        "Shows the size of a disk block.",
    ),
    (
        "bonjour",
        "postmaster",
        "off",
        "bool",
        "Connections and Authentication / Connection Settings",
        "",
        "off",
        "Enables advertising the server via Bonjour.",
    ),
    (
        "bonjour_name",
        "postmaster",
        "",
        "string",
        "Connections and Authentication / Connection Settings",
        "",
        "",
        "Sets the Bonjour service name.",
    ),
    (
        "bytea_output",
        "user",
        "hex",
        "enum",
        "Client Connection Defaults / Statement Behavior",
        "",
        "hex",
        "Sets the output format for bytea.",
    ),
    (
        "check_function_bodies",
        "user",
        "on",
        "bool",
        "Client Connection Defaults / Statement Behavior",
        "",
        "on",
        "Check routine bodies during CREATE FUNCTION and CREATE PROCEDURE.",
    ),
    (
        "checkpoint_completion_target",
        "sighup",
        "0.9",
        "real",
        "Write-Ahead Log / Checkpoints",
        "",
        "0.9",
        "Time spent flushing dirty buffers during checkpoint, as fraction of checkpoint interval.",
    ),
    (
        "checkpoint_flush_after",
        "sighup",
        "256kB",
        "integer",
        "Write-Ahead Log / Checkpoints",
        "8kB",
        "32",
        "Number of pages after which previously performed writes are flushed to disk.",
    ),
    (
        "checkpoint_timeout",
        "sighup",
        "5min",
        "integer",
        "Write-Ahead Log / Checkpoints",
        "s",
        "300",
        "Sets the maximum time between automatic WAL checkpoints.",
    ),
    (
        "checkpoint_warning",
        "sighup",
        "30s",
        "integer",
        "Write-Ahead Log / Checkpoints",
        "s",
        "30",
        "Sets the maximum time before warning if checkpoints triggered by WAL volume happen too frequently.",
    ),
    (
        "client_connection_check_interval",
        "user",
        "0",
        "integer",
        "Connections and Authentication / TCP Settings",
        "ms",
        "0",
        "Sets the time interval between checks for disconnection while running queries.",
    ),
    (
        "client_encoding",
        "user",
        "SQL_ASCII",
        "string",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "SQL_ASCII",
        "Sets the client's character set encoding.",
    ),
    (
        "client_min_messages",
        "user",
        "notice",
        "enum",
        "Client Connection Defaults / Statement Behavior",
        "",
        "notice",
        "Sets the message levels that are sent to the client.",
    ),
    (
        "cluster_name",
        "postmaster",
        "",
        "string",
        "Reporting and Logging / Process Title",
        "",
        "",
        "Sets the name of the cluster, which is included in the process title.",
    ),
    (
        "commit_delay",
        "superuser",
        "0",
        "integer",
        "Write-Ahead Log / Settings",
        "",
        "0",
        "Sets the delay in microseconds between transaction commit and flushing WAL to disk.",
    ),
    (
        "commit_siblings",
        "user",
        "5",
        "integer",
        "Write-Ahead Log / Settings",
        "",
        "5",
        "Sets the minimum number of concurrent open transactions required before performing \"commit_delay\".",
    ),
    (
        "commit_timestamp_buffers",
        "postmaster",
        "0",
        "integer",
        "Resource Usage / Memory",
        "8kB",
        "0",
        "Sets the size of the dedicated buffer pool used for the commit timestamp cache.",
    ),
    (
        "compute_query_id",
        "superuser",
        "auto",
        "enum",
        "Statistics / Monitoring",
        "",
        "auto",
        "Enables in-core computation of query identifiers.",
    ),
    (
        "config_file",
        "postmaster",
        "",
        "string",
        "File Locations",
        "",
        "",
        "Sets the server's main configuration file.",
    ),
    (
        "constraint_exclusion",
        "user",
        "partition",
        "enum",
        "Query Tuning / Other Planner Options",
        "",
        "partition",
        "Enables the planner to use constraints to optimize queries.",
    ),
    (
        "cpu_index_tuple_cost",
        "user",
        "0.005",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "0.005",
        "Sets the planner's estimate of the cost of processing each index entry during an index scan.",
    ),
    (
        "cpu_operator_cost",
        "user",
        "0.0025",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "0.0025",
        "Sets the planner's estimate of the cost of processing each operator or function call.",
    ),
    (
        "cpu_tuple_cost",
        "user",
        "0.01",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "0.01",
        "Sets the planner's estimate of the cost of processing each tuple (row).",
    ),
    (
        "createrole_self_grant",
        "user",
        "",
        "string",
        "Client Connection Defaults / Statement Behavior",
        "",
        "",
        "Sets whether a CREATEROLE user automatically grants the role to themselves, and with which options.",
    ),
    (
        "cursor_tuple_fraction",
        "user",
        "0.1",
        "real",
        "Query Tuning / Other Planner Options",
        "",
        "0.1",
        "Sets the planner's estimate of the fraction of a cursor's rows that will be retrieved.",
    ),
    (
        "data_checksums",
        "internal",
        "off",
        "bool",
        "Preset Options",
        "",
        "off",
        "Shows whether data checksums are turned on for this cluster.",
    ),
    (
        "data_directory",
        "postmaster",
        "",
        "string",
        "File Locations",
        "",
        "",
        "Sets the server's data directory.",
    ),
    (
        "data_directory_mode",
        "internal",
        "448",
        "integer",
        "Preset Options",
        "",
        "448",
        "Shows the mode of the data directory.",
    ),
    (
        "data_sync_retry",
        "postmaster",
        "off",
        "bool",
        "Error Handling",
        "",
        "off",
        "Whether to continue running after a failure to sync data files.",
    ),
    (
        "datestyle",
        "user",
        "ISO, MDY",
        "string",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "ISO, MDY",
        "Sets the display format for date and time values.",
    ),
    (
        "deadlock_timeout",
        "superuser",
        "1s",
        "integer",
        "Lock Management",
        "ms",
        "1000",
        "Sets the time to wait on a lock before checking for deadlock.",
    ),
    (
        "debug_assertions",
        "internal",
        "off",
        "bool",
        "Preset Options",
        "",
        "off",
        "Shows whether the running server has assertion checks enabled.",
    ),
    (
        "debug_discard_caches",
        "superuser",
        "0",
        "integer",
        "Developer Options",
        "",
        "0",
        "Aggressively flush system caches for debugging purposes.",
    ),
    (
        "debug_io_direct",
        "postmaster",
        "",
        "string",
        "Developer Options",
        "",
        "",
        "Use direct I/O for file access.",
    ),
    (
        "debug_logical_replication_streaming",
        "user",
        "buffered",
        "enum",
        "Developer Options",
        "",
        "buffered",
        "Forces immediate streaming or serialization of changes in large transactions.",
    ),
    (
        "debug_parallel_query",
        "user",
        "off",
        "enum",
        "Developer Options",
        "",
        "off",
        "Forces the planner's use parallel query nodes.",
    ),
    (
        "debug_pretty_print",
        "user",
        "on",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "on",
        "Indents parse and plan tree displays.",
    ),
    (
        "debug_print_parse",
        "user",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs each query's parse tree.",
    ),
    (
        "debug_print_plan",
        "user",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs each query's execution plan.",
    ),
    (
        "debug_print_rewritten",
        "user",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs each query's rewritten parse tree.",
    ),
    (
        "default_statistics_target",
        "user",
        "100",
        "integer",
        "Query Tuning / Other Planner Options",
        "",
        "100",
        "Sets the default statistics target.",
    ),
    (
        "default_table_access_method",
        "user",
        "heap",
        "string",
        "Client Connection Defaults / Statement Behavior",
        "",
        "heap",
        "Sets the default table access method for new tables.",
    ),
    (
        "default_tablespace",
        "user",
        "",
        "string",
        "Client Connection Defaults / Statement Behavior",
        "",
        "",
        "Sets the default tablespace to create tables and indexes in.",
    ),
    (
        "default_text_search_config",
        "user",
        "pg_catalog.simple",
        "string",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "pg_catalog.simple",
        "Sets default text search configuration.",
    ),
    (
        "default_toast_compression",
        "user",
        "pglz",
        "enum",
        "Client Connection Defaults / Statement Behavior",
        "",
        "pglz",
        "Sets the default compression method for compressible values.",
    ),
    (
        "default_transaction_deferrable",
        "user",
        "off",
        "bool",
        "Client Connection Defaults / Statement Behavior",
        "",
        "off",
        "Sets the default deferrable status of new transactions.",
    ),
    (
        "default_transaction_isolation",
        "user",
        "read committed",
        "enum",
        "Client Connection Defaults / Statement Behavior",
        "",
        "read committed",
        "Sets the transaction isolation level of each new transaction.",
    ),
    (
        "default_transaction_read_only",
        "user",
        "off",
        "bool",
        "Client Connection Defaults / Statement Behavior",
        "",
        "off",
        "Sets the default read-only status of new transactions.",
    ),
    (
        "dynamic_library_path",
        "superuser",
        "$libdir",
        "string",
        "Client Connection Defaults / Other Defaults",
        "",
        "$libdir",
        "Sets the path for dynamically loadable modules.",
    ),
    (
        "dynamic_shared_memory_type",
        "postmaster",
        "posix",
        "enum",
        "Resource Usage / Memory",
        "",
        "posix",
        "Selects the dynamic shared memory implementation used.",
    ),
    (
        "effective_cache_size",
        "user",
        "4GB",
        "integer",
        "Query Tuning / Planner Cost Constants",
        "8kB",
        "524288",
        "Sets the planner's assumption about the total size of the data caches.",
    ),
    (
        "effective_io_concurrency",
        "user",
        "16",
        "integer",
        "Resource Usage / I/O",
        "",
        "16",
        "Number of simultaneous requests that can be handled efficiently by the disk subsystem.",
    ),
    (
        "enable_async_append",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of async append plans.",
    ),
    (
        "enable_bitmapscan",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of bitmap-scan plans.",
    ),
    (
        "enable_distinct_reordering",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables reordering of DISTINCT keys.",
    ),
    (
        "enable_gathermerge",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of gather merge plans.",
    ),
    (
        "enable_group_by_reordering",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables reordering of GROUP BY keys.",
    ),
    (
        "enable_hashagg",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of hashed aggregation plans.",
    ),
    (
        "enable_hashjoin",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of hash join plans.",
    ),
    (
        "enable_incremental_sort",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of incremental sort steps.",
    ),
    (
        "enable_indexonlyscan",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of index-only-scan plans.",
    ),
    (
        "enable_indexscan",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of index-scan plans.",
    ),
    (
        "enable_material",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of materialization.",
    ),
    (
        "enable_memoize",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of memoization.",
    ),
    (
        "enable_mergejoin",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of merge join plans.",
    ),
    (
        "enable_nestloop",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of nested-loop join plans.",
    ),
    (
        "enable_parallel_append",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of parallel append plans.",
    ),
    (
        "enable_parallel_hash",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of parallel hash plans.",
    ),
    (
        "enable_partition_pruning",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables plan-time and execution-time partition pruning.",
    ),
    (
        "enable_partitionwise_aggregate",
        "user",
        "off",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "off",
        "Enables partitionwise aggregation and grouping.",
    ),
    (
        "enable_partitionwise_join",
        "user",
        "off",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "off",
        "Enables partitionwise join.",
    ),
    (
        "enable_presorted_aggregate",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's ability to produce plans that provide presorted input for ORDER BY / DISTINCT aggregate functions.",
    ),
    (
        "enable_self_join_elimination",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables removal of unique self-joins.",
    ),
    (
        "enable_seqscan",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of sequential-scan plans.",
    ),
    (
        "enable_sort",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of explicit sort steps.",
    ),
    (
        "enable_tidscan",
        "user",
        "on",
        "bool",
        "Query Tuning / Planner Method Configuration",
        "",
        "on",
        "Enables the planner's use of TID scan plans.",
    ),
    (
        "escape_string_warning",
        "user",
        "on",
        "bool",
        "Version and Platform Compatibility / Previous PostgreSQL Versions",
        "",
        "on",
        "Warn about backslash escapes in ordinary string literals.",
    ),
    (
        "event_source",
        "postmaster",
        "PostgreSQL",
        "string",
        "Reporting and Logging / Where to Log",
        "",
        "PostgreSQL",
        "Sets the application name used to identify PostgreSQL messages in the event log.",
    ),
    (
        "event_triggers",
        "superuser",
        "on",
        "bool",
        "Client Connection Defaults / Statement Behavior",
        "",
        "on",
        "Enables event triggers.",
    ),
    (
        "exit_on_error",
        "user",
        "off",
        "bool",
        "Error Handling",
        "",
        "off",
        "Terminate session on any error.",
    ),
    (
        "extension_control_path",
        "superuser",
        "$system",
        "string",
        "Client Connection Defaults / Other Defaults",
        "",
        "$system",
        "Sets the path for extension control files.",
    ),
    (
        "external_pid_file",
        "postmaster",
        "",
        "string",
        "File Locations",
        "",
        "",
        "Writes the postmaster PID to the specified file.",
    ),
    (
        "extra_float_digits",
        "user",
        "1",
        "integer",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "1",
        "Sets the number of digits displayed for floating-point values.",
    ),
    (
        "file_copy_method",
        "user",
        "copy",
        "enum",
        "Resource Usage / Disk",
        "",
        "copy",
        "Selects the file copy method.",
    ),
    (
        "file_extend_method",
        "sighup",
        "posix_fallocate",
        "enum",
        "Resource Usage / Disk",
        "",
        "posix_fallocate",
        "Selects the method used for extending data files.",
    ),
    (
        "from_collapse_limit",
        "user",
        "8",
        "integer",
        "Query Tuning / Other Planner Options",
        "",
        "8",
        "Sets the FROM-list size beyond which subqueries are not collapsed.",
    ),
    (
        "fsync",
        "sighup",
        "on",
        "bool",
        "Write-Ahead Log / Settings",
        "",
        "on",
        "Forces synchronization of updates to disk.",
    ),
    (
        "full_page_writes",
        "sighup",
        "on",
        "bool",
        "Write-Ahead Log / Settings",
        "",
        "on",
        "Writes full pages to WAL when first modified after a checkpoint.",
    ),
    (
        "geqo",
        "user",
        "on",
        "bool",
        "Query Tuning / Genetic Query Optimizer",
        "",
        "on",
        "Enables genetic query optimization.",
    ),
    (
        "geqo_effort",
        "user",
        "5",
        "integer",
        "Query Tuning / Genetic Query Optimizer",
        "",
        "5",
        "GEQO: effort is used to set the default for other GEQO parameters.",
    ),
    (
        "geqo_generations",
        "user",
        "0",
        "integer",
        "Query Tuning / Genetic Query Optimizer",
        "",
        "0",
        "GEQO: number of iterations of the algorithm.",
    ),
    (
        "geqo_pool_size",
        "user",
        "0",
        "integer",
        "Query Tuning / Genetic Query Optimizer",
        "",
        "0",
        "GEQO: number of individuals in the population.",
    ),
    (
        "geqo_seed",
        "user",
        "0",
        "real",
        "Query Tuning / Genetic Query Optimizer",
        "",
        "0",
        "GEQO: seed for random path selection.",
    ),
    (
        "geqo_selection_bias",
        "user",
        "2",
        "real",
        "Query Tuning / Genetic Query Optimizer",
        "",
        "2",
        "GEQO: selective pressure within the population.",
    ),
    (
        "geqo_threshold",
        "user",
        "12",
        "integer",
        "Query Tuning / Genetic Query Optimizer",
        "",
        "12",
        "Sets the threshold of FROM items beyond which GEQO is used.",
    ),
    (
        "gin_fuzzy_search_limit",
        "user",
        "0",
        "integer",
        "Client Connection Defaults / Other Defaults",
        "",
        "0",
        "Sets the maximum allowed result for exact search by GIN.",
    ),
    (
        "gin_pending_list_limit",
        "user",
        "4MB",
        "integer",
        "Client Connection Defaults / Statement Behavior",
        "kB",
        "4096",
        "Sets the maximum size of the pending list for GIN index.",
    ),
    (
        "gss_accept_delegation",
        "sighup",
        "off",
        "bool",
        "Connections and Authentication / Authentication",
        "",
        "off",
        "Sets whether GSSAPI delegation should be accepted from the client.",
    ),
    (
        "hash_mem_multiplier",
        "user",
        "2",
        "real",
        "Resource Usage / Memory",
        "",
        "2",
        "Multiple of \"work_mem\" to use for hash tables.",
    ),
    (
        "hba_file",
        "postmaster",
        "",
        "string",
        "File Locations",
        "",
        "",
        "Sets the server's \"hba\" configuration file.",
    ),
    (
        "hot_standby",
        "postmaster",
        "on",
        "bool",
        "Replication / Standby Servers",
        "",
        "on",
        "Allows connections and queries during recovery.",
    ),
    (
        "hot_standby_feedback",
        "sighup",
        "off",
        "bool",
        "Replication / Standby Servers",
        "",
        "off",
        "Allows feedback from a hot standby to the primary that will avoid query conflicts.",
    ),
    (
        "huge_page_size",
        "postmaster",
        "0",
        "integer",
        "Resource Usage / Memory",
        "kB",
        "0",
        "The size of huge page that should be requested.",
    ),
    (
        "huge_pages",
        "postmaster",
        "try",
        "enum",
        "Resource Usage / Memory",
        "",
        "try",
        "Use of huge pages on Linux or Windows.",
    ),
    (
        "huge_pages_status",
        "internal",
        "unknown",
        "enum",
        "Preset Options",
        "",
        "unknown",
        "Indicates the status of huge pages.",
    ),
    (
        "icu_validation_level",
        "user",
        "warning",
        "enum",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "warning",
        "Log level for reporting invalid ICU locale strings.",
    ),
    (
        "ident_file",
        "postmaster",
        "",
        "string",
        "File Locations",
        "",
        "",
        "Sets the server's \"ident\" configuration file.",
    ),
    (
        "idle_in_transaction_session_timeout",
        "user",
        "0",
        "integer",
        "Client Connection Defaults / Statement Behavior",
        "ms",
        "0",
        "Sets the maximum allowed idle time between queries, when in a transaction.",
    ),
    (
        "idle_replication_slot_timeout",
        "sighup",
        "0",
        "integer",
        "Replication / Sending Servers",
        "s",
        "0",
        "Sets the duration a replication slot can remain idle before it is invalidated.",
    ),
    (
        "idle_session_timeout",
        "user",
        "0",
        "integer",
        "Client Connection Defaults / Statement Behavior",
        "ms",
        "0",
        "Sets the maximum allowed idle time between queries, when not in a transaction.",
    ),
    (
        "ignore_checksum_failure",
        "superuser",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Continues processing after a checksum failure.",
    ),
    (
        "ignore_invalid_pages",
        "postmaster",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Continues recovery after an invalid pages failure.",
    ),
    (
        "ignore_system_indexes",
        "backend",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Disables reading from system indexes.",
    ),
    (
        "in_hot_standby",
        "internal",
        "off",
        "bool",
        "Preset Options",
        "",
        "off",
        "Shows whether hot standby is currently active.",
    ),
    (
        "integer_datetimes",
        "internal",
        "on",
        "bool",
        "Preset Options",
        "",
        "on",
        "Shows whether datetimes are integer based.",
    ),
    (
        "intervalstyle",
        "user",
        "postgres",
        "enum",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "postgres",
        "Sets the display format for interval values.",
    ),
    (
        "io_combine_limit",
        "user",
        "128kB",
        "integer",
        "Resource Usage / I/O",
        "8kB",
        "16",
        "Limit on the size of data reads and writes.",
    ),
    (
        "io_max_combine_limit",
        "postmaster",
        "128kB",
        "integer",
        "Resource Usage / I/O",
        "8kB",
        "16",
        "Server-wide limit that clamps io_combine_limit.",
    ),
    (
        "io_max_concurrency",
        "postmaster",
        "-1",
        "integer",
        "Resource Usage / I/O",
        "",
        "-1",
        "Max number of IOs that one process can execute simultaneously.",
    ),
    (
        "io_method",
        "postmaster",
        "worker",
        "enum",
        "Resource Usage / I/O",
        "",
        "worker",
        "Selects the method for executing asynchronous I/O.",
    ),
    (
        "io_workers",
        "sighup",
        "3",
        "integer",
        "Resource Usage / I/O",
        "",
        "3",
        "Number of IO worker processes, for io_method=worker.",
    ),
    (
        "jit",
        "user",
        "on",
        "bool",
        "Query Tuning / Other Planner Options",
        "",
        "on",
        "Allow JIT compilation.",
    ),
    (
        "jit_above_cost",
        "user",
        "100000",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "100000",
        "Perform JIT compilation if query is more expensive.",
    ),
    (
        "jit_debugging_support",
        "superuser-backend",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Register JIT-compiled functions with debugger.",
    ),
    (
        "jit_dump_bitcode",
        "superuser",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Write out LLVM bitcode to facilitate JIT debugging.",
    ),
    (
        "jit_expressions",
        "user",
        "on",
        "bool",
        "Developer Options",
        "",
        "on",
        "Allow JIT compilation of expressions.",
    ),
    (
        "jit_inline_above_cost",
        "user",
        "500000",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "500000",
        "Perform JIT inlining if query is more expensive.",
    ),
    (
        "jit_optimize_above_cost",
        "user",
        "500000",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "500000",
        "Optimize JIT-compiled functions if query is more expensive.",
    ),
    (
        "jit_profiling_support",
        "superuser-backend",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Register JIT-compiled functions with perf profiler.",
    ),
    (
        "jit_provider",
        "postmaster",
        "llvmjit",
        "string",
        "Client Connection Defaults / Shared Library Preloading",
        "",
        "llvmjit",
        "JIT provider to use.",
    ),
    (
        "jit_tuple_deforming",
        "user",
        "on",
        "bool",
        "Developer Options",
        "",
        "on",
        "Allow JIT compilation of tuple deforming.",
    ),
    (
        "join_collapse_limit",
        "user",
        "8",
        "integer",
        "Query Tuning / Other Planner Options",
        "",
        "8",
        "Sets the FROM-list size beyond which JOIN constructs are not flattened.",
    ),
    (
        "krb_caseins_users",
        "sighup",
        "off",
        "bool",
        "Connections and Authentication / Authentication",
        "",
        "off",
        "Sets whether Kerberos and GSSAPI user names should be treated as case-insensitive.",
    ),
    (
        "krb_server_keyfile",
        "sighup",
        "FILE:/etc/postgresql-common/krb5.keytab",
        "string",
        "Connections and Authentication / Authentication",
        "",
        "FILE:/etc/postgresql-common/krb5.keytab",
        "Sets the location of the Kerberos server key file.",
    ),
    (
        "lc_messages",
        "superuser",
        "",
        "string",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "",
        "Sets the language in which messages are displayed.",
    ),
    (
        "lc_monetary",
        "user",
        "C",
        "string",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "C",
        "Sets the locale for formatting monetary amounts.",
    ),
    (
        "lc_numeric",
        "user",
        "C",
        "string",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "C",
        "Sets the locale for formatting numbers.",
    ),
    (
        "lc_time",
        "user",
        "C",
        "string",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "C",
        "Sets the locale for formatting date and time values.",
    ),
    (
        "listen_addresses",
        "postmaster",
        "localhost",
        "string",
        "Connections and Authentication / Connection Settings",
        "",
        "localhost",
        "Sets the host name or IP address(es) to listen to.",
    ),
    (
        "lo_compat_privileges",
        "superuser",
        "off",
        "bool",
        "Version and Platform Compatibility / Previous PostgreSQL Versions",
        "",
        "off",
        "Enables backward compatibility mode for privilege checks on large objects.",
    ),
    (
        "local_preload_libraries",
        "user",
        "",
        "string",
        "Client Connection Defaults / Shared Library Preloading",
        "",
        "",
        "Lists unprivileged shared libraries to preload into each backend.",
    ),
    (
        "lock_timeout",
        "user",
        "0",
        "integer",
        "Client Connection Defaults / Statement Behavior",
        "ms",
        "0",
        "Sets the maximum allowed duration of any wait for a lock.",
    ),
    (
        "log_autovacuum_min_duration",
        "sighup",
        "10min",
        "integer",
        "Reporting and Logging / What to Log",
        "ms",
        "600000",
        "Sets the minimum execution time above which autovacuum actions will be logged.",
    ),
    (
        "log_checkpoints",
        "sighup",
        "on",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "on",
        "Logs each checkpoint.",
    ),
    (
        "log_connections",
        "superuser-backend",
        "",
        "string",
        "Reporting and Logging / What to Log",
        "",
        "",
        "Logs specified aspects of connection establishment and setup.",
    ),
    (
        "log_destination",
        "sighup",
        "stderr",
        "string",
        "Reporting and Logging / Where to Log",
        "",
        "stderr",
        "Sets the destination for server log output.",
    ),
    (
        "log_directory",
        "sighup",
        "log",
        "string",
        "Reporting and Logging / Where to Log",
        "",
        "log",
        "Sets the destination directory for log files.",
    ),
    (
        "log_disconnections",
        "superuser-backend",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs end of a session, including duration.",
    ),
    (
        "log_duration",
        "superuser",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs the duration of each completed SQL statement.",
    ),
    (
        "log_error_verbosity",
        "superuser",
        "default",
        "enum",
        "Reporting and Logging / What to Log",
        "",
        "default",
        "Sets the verbosity of logged messages.",
    ),
    (
        "log_executor_stats",
        "superuser",
        "off",
        "bool",
        "Statistics / Monitoring",
        "",
        "off",
        "Writes executor performance statistics to the server log.",
    ),
    (
        "log_file_mode",
        "sighup",
        "384",
        "integer",
        "Reporting and Logging / Where to Log",
        "",
        "384",
        "Sets the file permissions for log files.",
    ),
    (
        "log_filename",
        "sighup",
        "postgresql-%Y-%m-%d_%H%M%S.log",
        "string",
        "Reporting and Logging / Where to Log",
        "",
        "postgresql-%Y-%m-%d_%H%M%S.log",
        "Sets the file name pattern for log files.",
    ),
    (
        "log_hostname",
        "sighup",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs the host name in the connection logs.",
    ),
    (
        "log_line_prefix",
        "sighup",
        "%m [%p] ",
        "string",
        "Reporting and Logging / What to Log",
        "",
        "%m [%p] ",
        "Controls information prefixed to each log line.",
    ),
    (
        "log_lock_failures",
        "superuser",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs lock failures.",
    ),
    (
        "log_lock_waits",
        "superuser",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs long lock waits.",
    ),
    (
        "log_min_duration_sample",
        "superuser",
        "-1",
        "integer",
        "Reporting and Logging / When to Log",
        "ms",
        "-1",
        "Sets the minimum execution time above which a sample of statements will be logged. Sampling is determined by \"log_statement_sample_rate\".",
    ),
    (
        "log_min_duration_statement",
        "superuser",
        "-1",
        "integer",
        "Reporting and Logging / When to Log",
        "ms",
        "-1",
        "Sets the minimum execution time above which all statements will be logged.",
    ),
    (
        "log_min_error_statement",
        "superuser",
        "error",
        "enum",
        "Reporting and Logging / When to Log",
        "",
        "error",
        "Causes all statements generating error at or above this level to be logged.",
    ),
    (
        "log_min_messages",
        "superuser",
        "warning",
        "enum",
        "Reporting and Logging / When to Log",
        "",
        "warning",
        "Sets the message levels that are logged.",
    ),
    (
        "log_parameter_max_length",
        "superuser",
        "-1",
        "integer",
        "Reporting and Logging / What to Log",
        "B",
        "-1",
        "Sets the maximum length in bytes of data logged for bind parameter values when logging statements.",
    ),
    (
        "log_parameter_max_length_on_error",
        "user",
        "0",
        "integer",
        "Reporting and Logging / What to Log",
        "B",
        "0",
        "Sets the maximum length in bytes of data logged for bind parameter values when logging statements, on error.",
    ),
    (
        "log_parser_stats",
        "superuser",
        "off",
        "bool",
        "Statistics / Monitoring",
        "",
        "off",
        "Writes parser performance statistics to the server log.",
    ),
    (
        "log_planner_stats",
        "superuser",
        "off",
        "bool",
        "Statistics / Monitoring",
        "",
        "off",
        "Writes planner performance statistics to the server log.",
    ),
    (
        "log_recovery_conflict_waits",
        "sighup",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs standby recovery conflict waits.",
    ),
    (
        "log_replication_commands",
        "superuser",
        "off",
        "bool",
        "Reporting and Logging / What to Log",
        "",
        "off",
        "Logs each replication command.",
    ),
    (
        "log_rotation_age",
        "sighup",
        "1d",
        "integer",
        "Reporting and Logging / Where to Log",
        "min",
        "1440",
        "Sets the amount of time to wait before forcing log file rotation.",
    ),
    (
        "log_rotation_size",
        "sighup",
        "10MB",
        "integer",
        "Reporting and Logging / Where to Log",
        "kB",
        "10240",
        "Sets the maximum size a log file can reach before being rotated.",
    ),
    (
        "log_startup_progress_interval",
        "sighup",
        "10s",
        "integer",
        "Reporting and Logging / When to Log",
        "ms",
        "10000",
        "Time between progress updates for long-running startup operations.",
    ),
    (
        "log_statement",
        "superuser",
        "none",
        "enum",
        "Reporting and Logging / What to Log",
        "",
        "none",
        "Sets the type of statements logged.",
    ),
    (
        "log_statement_sample_rate",
        "superuser",
        "1",
        "real",
        "Reporting and Logging / When to Log",
        "",
        "1",
        "Fraction of statements exceeding \"log_min_duration_sample\" to be logged.",
    ),
    (
        "log_statement_stats",
        "superuser",
        "off",
        "bool",
        "Statistics / Monitoring",
        "",
        "off",
        "Writes cumulative performance statistics to the server log.",
    ),
    (
        "log_temp_files",
        "superuser",
        "-1",
        "integer",
        "Reporting and Logging / What to Log",
        "kB",
        "-1",
        "Log the use of temporary files larger than this number of kilobytes.",
    ),
    (
        "log_timezone",
        "sighup",
        "GMT",
        "string",
        "Reporting and Logging / What to Log",
        "",
        "GMT",
        "Sets the time zone to use in log messages.",
    ),
    (
        "log_transaction_sample_rate",
        "superuser",
        "0",
        "real",
        "Reporting and Logging / When to Log",
        "",
        "0",
        "Sets the fraction of transactions from which to log all statements.",
    ),
    (
        "log_truncate_on_rotation",
        "sighup",
        "off",
        "bool",
        "Reporting and Logging / Where to Log",
        "",
        "off",
        "Truncate existing log files of same name during log rotation.",
    ),
    (
        "logging_collector",
        "postmaster",
        "off",
        "bool",
        "Reporting and Logging / Where to Log",
        "",
        "off",
        "Start a subprocess to capture stderr, csvlog and/or jsonlog into log files.",
    ),
    (
        "logical_decoding_work_mem",
        "user",
        "64MB",
        "integer",
        "Resource Usage / Memory",
        "kB",
        "65536",
        "Sets the maximum memory to be used for logical decoding.",
    ),
    (
        "maintenance_io_concurrency",
        "user",
        "16",
        "integer",
        "Resource Usage / I/O",
        "",
        "16",
        "A variant of \"effective_io_concurrency\" that is used for maintenance work.",
    ),
    (
        "maintenance_work_mem",
        "user",
        "64MB",
        "integer",
        "Resource Usage / Memory",
        "kB",
        "65536",
        "Sets the maximum memory to be used for maintenance operations.",
    ),
    (
        "max_active_replication_origins",
        "postmaster",
        "10",
        "integer",
        "Replication / Subscribers",
        "",
        "10",
        "Sets the maximum number of active replication origins.",
    ),
    (
        "max_connections",
        "postmaster",
        "100",
        "integer",
        "Connections and Authentication / Connection Settings",
        "",
        "100",
        "Sets the maximum number of concurrent connections.",
    ),
    (
        "max_files_per_process",
        "postmaster",
        "1000",
        "integer",
        "Resource Usage / Kernel Resources",
        "",
        "1000",
        "Sets the maximum number of files each server process is allowed to open simultaneously.",
    ),
    (
        "max_function_args",
        "internal",
        "100",
        "integer",
        "Preset Options",
        "",
        "100",
        "Shows the maximum number of function arguments.",
    ),
    (
        "max_identifier_length",
        "internal",
        "63",
        "integer",
        "Preset Options",
        "",
        "63",
        "Shows the maximum identifier length.",
    ),
    (
        "max_index_keys",
        "internal",
        "32",
        "integer",
        "Preset Options",
        "",
        "32",
        "Shows the maximum number of index keys.",
    ),
    (
        "max_locks_per_transaction",
        "postmaster",
        "64",
        "integer",
        "Lock Management",
        "",
        "64",
        "Sets the maximum number of locks per transaction.",
    ),
    (
        "max_logical_replication_workers",
        "postmaster",
        "4",
        "integer",
        "Replication / Subscribers",
        "",
        "4",
        "Maximum number of logical replication worker processes.",
    ),
    (
        "max_notify_queue_pages",
        "postmaster",
        "1048576",
        "integer",
        "Resource Usage / Disk",
        "",
        "1048576",
        "Sets the maximum number of allocated pages for NOTIFY / LISTEN queue.",
    ),
    (
        "max_parallel_apply_workers_per_subscription",
        "sighup",
        "2",
        "integer",
        "Replication / Subscribers",
        "",
        "2",
        "Maximum number of parallel apply workers per subscription.",
    ),
    (
        "max_parallel_maintenance_workers",
        "user",
        "2",
        "integer",
        "Resource Usage / Worker Processes",
        "",
        "2",
        "Sets the maximum number of parallel processes per maintenance operation.",
    ),
    (
        "max_parallel_workers",
        "user",
        "8",
        "integer",
        "Resource Usage / Worker Processes",
        "",
        "8",
        "Sets the maximum number of parallel workers that can be active at one time.",
    ),
    (
        "max_parallel_workers_per_gather",
        "user",
        "2",
        "integer",
        "Resource Usage / Worker Processes",
        "",
        "2",
        "Sets the maximum number of parallel processes per executor node.",
    ),
    (
        "max_pred_locks_per_page",
        "sighup",
        "2",
        "integer",
        "Lock Management",
        "",
        "2",
        "Sets the maximum number of predicate-locked tuples per page.",
    ),
    (
        "max_pred_locks_per_relation",
        "sighup",
        "-2",
        "integer",
        "Lock Management",
        "",
        "-2",
        "Sets the maximum number of predicate-locked pages and tuples per relation.",
    ),
    (
        "max_pred_locks_per_transaction",
        "postmaster",
        "64",
        "integer",
        "Lock Management",
        "",
        "64",
        "Sets the maximum number of predicate locks per transaction.",
    ),
    (
        "max_prepared_transactions",
        "postmaster",
        "0",
        "integer",
        "Resource Usage / Memory",
        "",
        "0",
        "Sets the maximum number of simultaneously prepared transactions.",
    ),
    (
        "max_replication_slots",
        "postmaster",
        "10",
        "integer",
        "Replication / Sending Servers",
        "",
        "10",
        "Sets the maximum number of simultaneously defined replication slots.",
    ),
    (
        "max_slot_wal_keep_size",
        "sighup",
        "-1",
        "integer",
        "Replication / Sending Servers",
        "MB",
        "-1",
        "Sets the maximum WAL size that can be reserved by replication slots.",
    ),
    (
        "max_stack_depth",
        "superuser",
        "100kB",
        "integer",
        "Resource Usage / Memory",
        "kB",
        "100",
        "Sets the maximum stack depth, in kilobytes.",
    ),
    (
        "max_standby_archive_delay",
        "sighup",
        "30s",
        "integer",
        "Replication / Standby Servers",
        "ms",
        "30000",
        "Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data.",
    ),
    (
        "max_standby_streaming_delay",
        "sighup",
        "30s",
        "integer",
        "Replication / Standby Servers",
        "ms",
        "30000",
        "Sets the maximum delay before canceling queries when a hot standby server is processing streamed WAL data.",
    ),
    (
        "max_sync_workers_per_subscription",
        "sighup",
        "2",
        "integer",
        "Replication / Subscribers",
        "",
        "2",
        "Maximum number of table synchronization workers per subscription.",
    ),
    (
        "max_wal_senders",
        "postmaster",
        "10",
        "integer",
        "Replication / Sending Servers",
        "",
        "10",
        "Sets the maximum number of simultaneously running WAL sender processes.",
    ),
    (
        "max_wal_size",
        "sighup",
        "1GB",
        "integer",
        "Write-Ahead Log / Checkpoints",
        "MB",
        "1024",
        "Sets the WAL size that triggers a checkpoint.",
    ),
    (
        "max_worker_processes",
        "postmaster",
        "8",
        "integer",
        "Resource Usage / Worker Processes",
        "",
        "8",
        "Maximum number of concurrent worker processes.",
    ),
    (
        "md5_password_warnings",
        "user",
        "on",
        "bool",
        "Connections and Authentication / Authentication",
        "",
        "on",
        "Enables deprecation warnings for MD5 passwords.",
    ),
    (
        "min_dynamic_shared_memory",
        "postmaster",
        "0",
        "integer",
        "Resource Usage / Memory",
        "MB",
        "0",
        "Amount of dynamic shared memory reserved at startup.",
    ),
    (
        "min_parallel_index_scan_size",
        "user",
        "512kB",
        "integer",
        "Query Tuning / Planner Cost Constants",
        "8kB",
        "64",
        "Sets the minimum amount of index data for a parallel scan.",
    ),
    (
        "min_parallel_table_scan_size",
        "user",
        "8MB",
        "integer",
        "Query Tuning / Planner Cost Constants",
        "8kB",
        "1024",
        "Sets the minimum amount of table data for a parallel scan.",
    ),
    (
        "min_wal_size",
        "sighup",
        "80MB",
        "integer",
        "Write-Ahead Log / Checkpoints",
        "MB",
        "80",
        "Sets the minimum size to shrink the WAL to.",
    ),
    (
        "multixact_member_buffers",
        "postmaster",
        "256kB",
        "integer",
        "Resource Usage / Memory",
        "8kB",
        "32",
        "Sets the size of the dedicated buffer pool used for the MultiXact member cache.",
    ),
    (
        "multixact_offset_buffers",
        "postmaster",
        "128kB",
        "integer",
        "Resource Usage / Memory",
        "8kB",
        "16",
        "Sets the size of the dedicated buffer pool used for the MultiXact offset cache.",
    ),
    (
        "notify_buffers",
        "postmaster",
        "128kB",
        "integer",
        "Resource Usage / Memory",
        "8kB",
        "16",
        "Sets the size of the dedicated buffer pool used for the LISTEN/NOTIFY message cache.",
    ),
    (
        "num_os_semaphores",
        "internal",
        "0",
        "integer",
        "Preset Options",
        "",
        "0",
        "Shows the number of semaphores required for the server.",
    ),
    (
        "oauth_validator_libraries",
        "sighup",
        "",
        "string",
        "Connections and Authentication / Authentication",
        "",
        "",
        "Lists libraries that may be called to validate OAuth v2 bearer tokens.",
    ),
    (
        "parallel_leader_participation",
        "user",
        "on",
        "bool",
        "Resource Usage / Worker Processes",
        "",
        "on",
        "Controls whether Gather and Gather Merge also run subplans.",
    ),
    (
        "parallel_setup_cost",
        "user",
        "1000",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "1000",
        "Sets the planner's estimate of the cost of starting up worker processes for parallel query.",
    ),
    (
        "parallel_tuple_cost",
        "user",
        "0.1",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "0.1",
        "Sets the planner's estimate of the cost of passing each tuple (row) from worker to leader backend.",
    ),
    (
        "password_encryption",
        "user",
        "scram-sha-256",
        "enum",
        "Connections and Authentication / Authentication",
        "",
        "scram-sha-256",
        "Chooses the algorithm for encrypting passwords.",
    ),
    (
        "plan_cache_mode",
        "user",
        "auto",
        "enum",
        "Query Tuning / Other Planner Options",
        "",
        "auto",
        "Controls the planner's selection of custom or generic plan.",
    ),
    (
        "port",
        "postmaster",
        "5432",
        "integer",
        "Connections and Authentication / Connection Settings",
        "",
        "5432",
        "Sets the TCP port the server listens on.",
    ),
    (
        "post_auth_delay",
        "backend",
        "0",
        "integer",
        "Developer Options",
        "s",
        "0",
        "Sets the amount of time to wait after authentication on connection startup.",
    ),
    (
        "pre_auth_delay",
        "sighup",
        "0",
        "integer",
        "Developer Options",
        "s",
        "0",
        "Sets the amount of time to wait before authentication on connection startup.",
    ),
    (
        "primary_conninfo",
        "sighup",
        "",
        "string",
        "Replication / Standby Servers",
        "",
        "",
        "Sets the connection string to be used to connect to the sending server.",
    ),
    (
        "primary_slot_name",
        "sighup",
        "",
        "string",
        "Replication / Standby Servers",
        "",
        "",
        "Sets the name of the replication slot to use on the sending server.",
    ),
    (
        "quote_all_identifiers",
        "user",
        "off",
        "bool",
        "Version and Platform Compatibility / Previous PostgreSQL Versions",
        "",
        "off",
        "When generating SQL fragments, quote all identifiers.",
    ),
    (
        "random_page_cost",
        "user",
        "4",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "4",
        "Sets the planner's estimate of the cost of a nonsequentially fetched disk page.",
    ),
    (
        "recovery_end_command",
        "sighup",
        "",
        "string",
        "Write-Ahead Log / Archive Recovery",
        "",
        "",
        "Sets the shell command that will be executed once at the end of recovery.",
    ),
    (
        "recovery_init_sync_method",
        "sighup",
        "fsync",
        "enum",
        "Error Handling",
        "",
        "fsync",
        "Sets the method for synchronizing the data directory before crash recovery.",
    ),
    (
        "recovery_min_apply_delay",
        "sighup",
        "0",
        "integer",
        "Replication / Standby Servers",
        "ms",
        "0",
        "Sets the minimum delay for applying changes during recovery.",
    ),
    (
        "recovery_prefetch",
        "sighup",
        "try",
        "enum",
        "Write-Ahead Log / Recovery",
        "",
        "try",
        "Prefetch referenced blocks during recovery.",
    ),
    (
        "recovery_target",
        "postmaster",
        "",
        "string",
        "Write-Ahead Log / Recovery Target",
        "",
        "",
        "Set to \"immediate\" to end recovery as soon as a consistent state is reached.",
    ),
    (
        "recovery_target_action",
        "postmaster",
        "pause",
        "enum",
        "Write-Ahead Log / Recovery Target",
        "",
        "pause",
        "Sets the action to perform upon reaching the recovery target.",
    ),
    (
        "recovery_target_inclusive",
        "postmaster",
        "on",
        "bool",
        "Write-Ahead Log / Recovery Target",
        "",
        "on",
        "Sets whether to include or exclude transaction with recovery target.",
    ),
    (
        "recovery_target_lsn",
        "postmaster",
        "",
        "string",
        "Write-Ahead Log / Recovery Target",
        "",
        "",
        "Sets the LSN of the write-ahead log location up to which recovery will proceed.",
    ),
    (
        "recovery_target_name",
        "postmaster",
        "",
        "string",
        "Write-Ahead Log / Recovery Target",
        "",
        "",
        "Sets the named restore point up to which recovery will proceed.",
    ),
    (
        "recovery_target_time",
        "postmaster",
        "",
        "string",
        "Write-Ahead Log / Recovery Target",
        "",
        "",
        "Sets the time stamp up to which recovery will proceed.",
    ),
    (
        "recovery_target_timeline",
        "postmaster",
        "latest",
        "string",
        "Write-Ahead Log / Recovery Target",
        "",
        "latest",
        "Specifies the timeline to recover into.",
    ),
    (
        "recovery_target_xid",
        "postmaster",
        "",
        "string",
        "Write-Ahead Log / Recovery Target",
        "",
        "",
        "Sets the transaction ID up to which recovery will proceed.",
    ),
    (
        "recursive_worktable_factor",
        "user",
        "10",
        "real",
        "Query Tuning / Other Planner Options",
        "",
        "10",
        "Sets the planner's estimate of the average size of a recursive query's working table.",
    ),
    (
        "remove_temp_files_after_crash",
        "sighup",
        "on",
        "bool",
        "Developer Options",
        "",
        "on",
        "Remove temporary files after backend crash.",
    ),
    (
        "reserved_connections",
        "postmaster",
        "0",
        "integer",
        "Connections and Authentication / Connection Settings",
        "",
        "0",
        "Sets the number of connection slots reserved for roles with privileges of pg_use_reserved_connections.",
    ),
    (
        "restart_after_crash",
        "sighup",
        "on",
        "bool",
        "Error Handling",
        "",
        "on",
        "Reinitialize server after backend crash.",
    ),
    (
        "restore_command",
        "sighup",
        "",
        "string",
        "Write-Ahead Log / Archive Recovery",
        "",
        "",
        "Sets the shell command that will be called to retrieve an archived WAL file.",
    ),
    (
        "restrict_nonsystem_relation_kind",
        "user",
        "",
        "string",
        "Client Connection Defaults / Statement Behavior",
        "",
        "",
        "Prohibits access to non-system relations of specified kinds.",
    ),
    (
        "row_security",
        "user",
        "on",
        "bool",
        "Client Connection Defaults / Statement Behavior",
        "",
        "on",
        "Enables row security.",
    ),
    (
        "scram_iterations",
        "user",
        "4096",
        "integer",
        "Connections and Authentication / Authentication",
        "",
        "4096",
        "Sets the iteration count for SCRAM secret generation.",
    ),
    (
        "search_path",
        "user",
        "\"$user\", public",
        "string",
        "Client Connection Defaults / Statement Behavior",
        "",
        "\"$user\", public",
        "Sets the schema search order for names that are not schema-qualified.",
    ),
    (
        "segment_size",
        "internal",
        "1GB",
        "integer",
        "Preset Options",
        "8kB",
        "131072",
        "Shows the number of pages per disk file.",
    ),
    (
        "send_abort_for_crash",
        "sighup",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Send SIGABRT not SIGQUIT to child processes after backend crash.",
    ),
    (
        "send_abort_for_kill",
        "sighup",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Send SIGABRT not SIGKILL to stuck child processes.",
    ),
    (
        "seq_page_cost",
        "user",
        "1",
        "real",
        "Query Tuning / Planner Cost Constants",
        "",
        "1",
        "Sets the planner's estimate of the cost of a sequentially fetched disk page.",
    ),
    (
        "serializable_buffers",
        "postmaster",
        "256kB",
        "integer",
        "Resource Usage / Memory",
        "8kB",
        "32",
        "Sets the size of the dedicated buffer pool used for the serializable transaction cache.",
    ),
    (
        "server_encoding",
        "internal",
        "SQL_ASCII",
        "string",
        "Preset Options",
        "",
        "SQL_ASCII",
        "Shows the server (database) character set encoding.",
    ),
    (
        "server_version",
        "internal",
        "18.4 (Debian 18.4-1.pgdg13+1)",
        "string",
        "Preset Options",
        "",
        "18.4 (Debian 18.4-1.pgdg13+1)",
        "Shows the server version.",
    ),
    (
        "server_version_num",
        "internal",
        "180004",
        "integer",
        "Preset Options",
        "",
        "180004",
        "Shows the server version as an integer.",
    ),
    (
        "session_preload_libraries",
        "superuser",
        "",
        "string",
        "Client Connection Defaults / Shared Library Preloading",
        "",
        "",
        "Lists shared libraries to preload into each backend.",
    ),
    (
        "session_replication_role",
        "superuser",
        "origin",
        "enum",
        "Client Connection Defaults / Statement Behavior",
        "",
        "origin",
        "Sets the session's behavior for triggers and rewrite rules.",
    ),
    (
        "shared_buffers",
        "postmaster",
        "128MB",
        "integer",
        "Resource Usage / Memory",
        "8kB",
        "16384",
        "Sets the number of shared memory buffers used by the server.",
    ),
    (
        "shared_memory_size",
        "internal",
        "0",
        "integer",
        "Preset Options",
        "MB",
        "0",
        "Shows the size of the server's main shared memory area (rounded up to the nearest MB).",
    ),
    (
        "shared_memory_size_in_huge_pages",
        "internal",
        "-1",
        "integer",
        "Preset Options",
        "",
        "-1",
        "Shows the number of huge pages needed for the main shared memory area.",
    ),
    (
        "shared_memory_type",
        "postmaster",
        "mmap",
        "enum",
        "Resource Usage / Memory",
        "",
        "mmap",
        "Selects the shared memory implementation used for the main shared memory region.",
    ),
    (
        "shared_preload_libraries",
        "postmaster",
        "",
        "string",
        "Client Connection Defaults / Shared Library Preloading",
        "",
        "",
        "Lists shared libraries to preload into server.",
    ),
    (
        "ssl",
        "sighup",
        "off",
        "bool",
        "Connections and Authentication / SSL",
        "",
        "off",
        "Enables SSL connections.",
    ),
    (
        "ssl_ca_file",
        "sighup",
        "",
        "string",
        "Connections and Authentication / SSL",
        "",
        "",
        "Location of the SSL certificate authority file.",
    ),
    (
        "ssl_cert_file",
        "sighup",
        "server.crt",
        "string",
        "Connections and Authentication / SSL",
        "",
        "server.crt",
        "Location of the SSL server certificate file.",
    ),
    (
        "ssl_ciphers",
        "sighup",
        "HIGH:MEDIUM:+3DES:!aNULL",
        "string",
        "Connections and Authentication / SSL",
        "",
        "HIGH:MEDIUM:+3DES:!aNULL",
        "Sets the list of allowed TLSv1.2 (and lower) ciphers.",
    ),
    (
        "ssl_crl_dir",
        "sighup",
        "",
        "string",
        "Connections and Authentication / SSL",
        "",
        "",
        "Location of the SSL certificate revocation list directory.",
    ),
    (
        "ssl_crl_file",
        "sighup",
        "",
        "string",
        "Connections and Authentication / SSL",
        "",
        "",
        "Location of the SSL certificate revocation list file.",
    ),
    (
        "ssl_dh_params_file",
        "sighup",
        "",
        "string",
        "Connections and Authentication / SSL",
        "",
        "",
        "Location of the SSL DH parameters file.",
    ),
    (
        "ssl_groups",
        "sighup",
        "X25519:prime256v1",
        "string",
        "Connections and Authentication / SSL",
        "",
        "X25519:prime256v1",
        "Sets the group(s) to use for Diffie-Hellman key exchange.",
    ),
    (
        "ssl_key_file",
        "sighup",
        "server.key",
        "string",
        "Connections and Authentication / SSL",
        "",
        "server.key",
        "Location of the SSL server private key file.",
    ),
    (
        "ssl_library",
        "internal",
        "OpenSSL",
        "string",
        "Preset Options",
        "",
        "OpenSSL",
        "Shows the name of the SSL library.",
    ),
    (
        "ssl_max_protocol_version",
        "sighup",
        "",
        "enum",
        "Connections and Authentication / SSL",
        "",
        "",
        "Sets the maximum SSL/TLS protocol version to use.",
    ),
    (
        "ssl_min_protocol_version",
        "sighup",
        "TLSv1.2",
        "enum",
        "Connections and Authentication / SSL",
        "",
        "TLSv1.2",
        "Sets the minimum SSL/TLS protocol version to use.",
    ),
    (
        "ssl_passphrase_command",
        "sighup",
        "",
        "string",
        "Connections and Authentication / SSL",
        "",
        "",
        "Command to obtain passphrases for SSL.",
    ),
    (
        "ssl_passphrase_command_supports_reload",
        "sighup",
        "off",
        "bool",
        "Connections and Authentication / SSL",
        "",
        "off",
        "Controls whether \"ssl_passphrase_command\" is called during server reload.",
    ),
    (
        "ssl_prefer_server_ciphers",
        "sighup",
        "on",
        "bool",
        "Connections and Authentication / SSL",
        "",
        "on",
        "Give priority to server ciphersuite order.",
    ),
    (
        "ssl_tls13_ciphers",
        "sighup",
        "",
        "string",
        "Connections and Authentication / SSL",
        "",
        "",
        "Sets the list of allowed TLSv1.3 cipher suites.",
    ),
    (
        "standard_conforming_strings",
        "user",
        "on",
        "bool",
        "Version and Platform Compatibility / Previous PostgreSQL Versions",
        "",
        "on",
        "Causes '...' strings to treat backslashes literally.",
    ),
    (
        "statement_timeout",
        "user",
        "0",
        "integer",
        "Client Connection Defaults / Statement Behavior",
        "ms",
        "0",
        "Sets the maximum allowed duration of any statement.",
    ),
    (
        "stats_fetch_consistency",
        "user",
        "cache",
        "enum",
        "Statistics / Cumulative Query and Index Statistics",
        "",
        "cache",
        "Sets the consistency of accesses to statistics data.",
    ),
    (
        "subtransaction_buffers",
        "postmaster",
        "0",
        "integer",
        "Resource Usage / Memory",
        "8kB",
        "0",
        "Sets the size of the dedicated buffer pool used for the subtransaction cache.",
    ),
    (
        "summarize_wal",
        "sighup",
        "off",
        "bool",
        "Write-Ahead Log / Summarization",
        "",
        "off",
        "Starts the WAL summarizer process to enable incremental backup.",
    ),
    (
        "superuser_reserved_connections",
        "postmaster",
        "3",
        "integer",
        "Connections and Authentication / Connection Settings",
        "",
        "3",
        "Sets the number of connection slots reserved for superusers.",
    ),
    (
        "sync_replication_slots",
        "sighup",
        "off",
        "bool",
        "Replication / Standby Servers",
        "",
        "off",
        "Enables a physical standby to synchronize logical failover replication slots from the primary server.",
    ),
    (
        "synchronize_seqscans",
        "user",
        "on",
        "bool",
        "Version and Platform Compatibility / Previous PostgreSQL Versions",
        "",
        "on",
        "Enables synchronized sequential scans.",
    ),
    (
        "synchronized_standby_slots",
        "sighup",
        "",
        "string",
        "Replication / Primary Server",
        "",
        "",
        "Lists streaming replication standby server replication slot names that logical WAL sender processes will wait for.",
    ),
    (
        "synchronous_commit",
        "user",
        "on",
        "enum",
        "Write-Ahead Log / Settings",
        "",
        "on",
        "Sets the current transaction's synchronization level.",
    ),
    (
        "synchronous_standby_names",
        "sighup",
        "",
        "string",
        "Replication / Primary Server",
        "",
        "",
        "Number of synchronous standbys and list of names of potential synchronous ones.",
    ),
    (
        "syslog_facility",
        "sighup",
        "local0",
        "enum",
        "Reporting and Logging / Where to Log",
        "",
        "local0",
        "Sets the syslog \"facility\" to be used when syslog enabled.",
    ),
    (
        "syslog_ident",
        "sighup",
        "postgres",
        "string",
        "Reporting and Logging / Where to Log",
        "",
        "postgres",
        "Sets the program name used to identify PostgreSQL messages in syslog.",
    ),
    (
        "syslog_sequence_numbers",
        "sighup",
        "on",
        "bool",
        "Reporting and Logging / Where to Log",
        "",
        "on",
        "Add sequence number to syslog messages to avoid duplicate suppression.",
    ),
    (
        "syslog_split_messages",
        "sighup",
        "on",
        "bool",
        "Reporting and Logging / Where to Log",
        "",
        "on",
        "Split messages sent to syslog by lines and to fit into 1024 bytes.",
    ),
    (
        "tcp_keepalives_count",
        "user",
        "0",
        "integer",
        "Connections and Authentication / TCP Settings",
        "",
        "0",
        "Maximum number of TCP keepalive retransmits.",
    ),
    (
        "tcp_keepalives_idle",
        "user",
        "0",
        "integer",
        "Connections and Authentication / TCP Settings",
        "s",
        "0",
        "Time between issuing TCP keepalives.",
    ),
    (
        "tcp_keepalives_interval",
        "user",
        "0",
        "integer",
        "Connections and Authentication / TCP Settings",
        "s",
        "0",
        "Time between TCP keepalive retransmits.",
    ),
    (
        "tcp_user_timeout",
        "user",
        "0",
        "integer",
        "Connections and Authentication / TCP Settings",
        "ms",
        "0",
        "TCP user timeout.",
    ),
    (
        "temp_buffers",
        "user",
        "8MB",
        "integer",
        "Resource Usage / Memory",
        "8kB",
        "1024",
        "Sets the maximum number of temporary buffers used by each session.",
    ),
    (
        "temp_file_limit",
        "superuser",
        "-1",
        "integer",
        "Resource Usage / Disk",
        "kB",
        "-1",
        "Limits the total size of all temporary files used by each process.",
    ),
    (
        "temp_tablespaces",
        "user",
        "",
        "string",
        "Client Connection Defaults / Statement Behavior",
        "",
        "",
        "Sets the tablespace(s) to use for temporary tables and sort files.",
    ),
    (
        "timezone",
        "user",
        "GMT",
        "string",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "GMT",
        "Sets the time zone for displaying and interpreting time stamps.",
    ),
    (
        "timezone_abbreviations",
        "user",
        "",
        "string",
        "Client Connection Defaults / Locale and Formatting",
        "",
        "",
        "Selects a file of time zone abbreviations.",
    ),
    (
        "trace_connection_negotiation",
        "postmaster",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Logs details of pre-authentication connection handshake.",
    ),
    (
        "trace_notify",
        "user",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Generates debugging output for LISTEN and NOTIFY.",
    ),
    (
        "trace_sort",
        "user",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Emit information about resource usage in sorting.",
    ),
    (
        "track_activities",
        "superuser",
        "on",
        "bool",
        "Statistics / Cumulative Query and Index Statistics",
        "",
        "on",
        "Collects information about executing commands.",
    ),
    (
        "track_activity_query_size",
        "postmaster",
        "1kB",
        "integer",
        "Statistics / Cumulative Query and Index Statistics",
        "B",
        "1024",
        "Sets the size reserved for pg_stat_activity.query, in bytes.",
    ),
    (
        "track_commit_timestamp",
        "postmaster",
        "off",
        "bool",
        "Replication / Sending Servers",
        "",
        "off",
        "Collects transaction commit time.",
    ),
    (
        "track_cost_delay_timing",
        "superuser",
        "off",
        "bool",
        "Statistics / Cumulative Query and Index Statistics",
        "",
        "off",
        "Collects timing statistics for cost-based vacuum delay.",
    ),
    (
        "track_counts",
        "superuser",
        "on",
        "bool",
        "Statistics / Cumulative Query and Index Statistics",
        "",
        "on",
        "Collects statistics on database activity.",
    ),
    (
        "track_functions",
        "superuser",
        "none",
        "enum",
        "Statistics / Cumulative Query and Index Statistics",
        "",
        "none",
        "Collects function-level statistics on database activity.",
    ),
    (
        "track_io_timing",
        "superuser",
        "off",
        "bool",
        "Statistics / Cumulative Query and Index Statistics",
        "",
        "off",
        "Collects timing statistics for database I/O activity.",
    ),
    (
        "track_wal_io_timing",
        "superuser",
        "off",
        "bool",
        "Statistics / Cumulative Query and Index Statistics",
        "",
        "off",
        "Collects timing statistics for WAL I/O activity.",
    ),
    (
        "transaction_buffers",
        "postmaster",
        "0",
        "integer",
        "Resource Usage / Memory",
        "8kB",
        "0",
        "Sets the size of the dedicated buffer pool used for the transaction status cache.",
    ),
    (
        "transaction_deferrable",
        "user",
        "off",
        "bool",
        "Client Connection Defaults / Statement Behavior",
        "",
        "off",
        "Whether to defer a read-only serializable transaction until it can be executed with no possible serialization failures.",
    ),
    (
        "transaction_isolation",
        "user",
        "read committed",
        "enum",
        "Client Connection Defaults / Statement Behavior",
        "",
        "read committed",
        "Sets the current transaction's isolation level.",
    ),
    (
        "transaction_read_only",
        "user",
        "off",
        "bool",
        "Client Connection Defaults / Statement Behavior",
        "",
        "off",
        "Sets the current transaction's read-only status.",
    ),
    (
        "transaction_timeout",
        "user",
        "0",
        "integer",
        "Client Connection Defaults / Statement Behavior",
        "ms",
        "0",
        "Sets the maximum allowed duration of any transaction within a session (not a prepared transaction).",
    ),
    (
        "transform_null_equals",
        "user",
        "off",
        "bool",
        "Version and Platform Compatibility / Other Platforms and Clients",
        "",
        "off",
        "Treats \"expr=NULL\" as \"expr IS NULL\".",
    ),
    (
        "unix_socket_directories",
        "postmaster",
        "/var/run/postgresql",
        "string",
        "Connections and Authentication / Connection Settings",
        "",
        "/var/run/postgresql",
        "Sets the directories where Unix-domain sockets will be created.",
    ),
    (
        "unix_socket_group",
        "postmaster",
        "",
        "string",
        "Connections and Authentication / Connection Settings",
        "",
        "",
        "Sets the owning group of the Unix-domain socket.",
    ),
    (
        "unix_socket_permissions",
        "postmaster",
        "511",
        "integer",
        "Connections and Authentication / Connection Settings",
        "",
        "511",
        "Sets the access permissions of the Unix-domain socket.",
    ),
    (
        "update_process_title",
        "superuser",
        "on",
        "bool",
        "Reporting and Logging / Process Title",
        "",
        "on",
        "Updates the process title to show the active SQL command.",
    ),
    (
        "vacuum_buffer_usage_limit",
        "user",
        "2MB",
        "integer",
        "Resource Usage / Memory",
        "kB",
        "2048",
        "Sets the buffer pool size for VACUUM, ANALYZE, and autovacuum.",
    ),
    (
        "vacuum_cost_delay",
        "user",
        "0",
        "real",
        "Vacuuming / Cost-Based Vacuum Delay",
        "ms",
        "0",
        "Vacuum cost delay in milliseconds.",
    ),
    (
        "vacuum_cost_limit",
        "user",
        "200",
        "integer",
        "Vacuuming / Cost-Based Vacuum Delay",
        "",
        "200",
        "Vacuum cost amount available before napping.",
    ),
    (
        "vacuum_cost_page_dirty",
        "user",
        "20",
        "integer",
        "Vacuuming / Cost-Based Vacuum Delay",
        "",
        "20",
        "Vacuum cost for a page dirtied by vacuum.",
    ),
    (
        "vacuum_cost_page_hit",
        "user",
        "1",
        "integer",
        "Vacuuming / Cost-Based Vacuum Delay",
        "",
        "1",
        "Vacuum cost for a page found in the buffer cache.",
    ),
    (
        "vacuum_cost_page_miss",
        "user",
        "2",
        "integer",
        "Vacuuming / Cost-Based Vacuum Delay",
        "",
        "2",
        "Vacuum cost for a page not found in the buffer cache.",
    ),
    (
        "vacuum_failsafe_age",
        "user",
        "1600000000",
        "integer",
        "Vacuuming / Freezing",
        "",
        "1600000000",
        "Age at which VACUUM should trigger failsafe to avoid a wraparound outage.",
    ),
    (
        "vacuum_freeze_min_age",
        "user",
        "50000000",
        "integer",
        "Vacuuming / Freezing",
        "",
        "50000000",
        "Minimum age at which VACUUM should freeze a table row.",
    ),
    (
        "vacuum_freeze_table_age",
        "user",
        "150000000",
        "integer",
        "Vacuuming / Freezing",
        "",
        "150000000",
        "Age at which VACUUM should scan whole table to freeze tuples.",
    ),
    (
        "vacuum_max_eager_freeze_failure_rate",
        "user",
        "0.03",
        "real",
        "Vacuuming / Freezing",
        "",
        "0.03",
        "Fraction of pages in a relation vacuum can scan and fail to freeze before disabling eager scanning.",
    ),
    (
        "vacuum_multixact_failsafe_age",
        "user",
        "1600000000",
        "integer",
        "Vacuuming / Freezing",
        "",
        "1600000000",
        "Multixact age at which VACUUM should trigger failsafe to avoid a wraparound outage.",
    ),
    (
        "vacuum_multixact_freeze_min_age",
        "user",
        "5000000",
        "integer",
        "Vacuuming / Freezing",
        "",
        "5000000",
        "Minimum age at which VACUUM should freeze a MultiXactId in a table row.",
    ),
    (
        "vacuum_multixact_freeze_table_age",
        "user",
        "150000000",
        "integer",
        "Vacuuming / Freezing",
        "",
        "150000000",
        "Multixact age at which VACUUM should scan whole table to freeze tuples.",
    ),
    (
        "vacuum_truncate",
        "user",
        "on",
        "bool",
        "Vacuuming / Default Behavior",
        "",
        "on",
        "Enables vacuum to truncate empty pages at the end of the table.",
    ),
    (
        "wal_block_size",
        "internal",
        "8192",
        "integer",
        "Preset Options",
        "",
        "8192",
        "Shows the block size in the write ahead log.",
    ),
    (
        "wal_buffers",
        "postmaster",
        "-1",
        "integer",
        "Write-Ahead Log / Settings",
        "8kB",
        "-1",
        "Sets the number of disk-page buffers in shared memory for WAL.",
    ),
    (
        "wal_compression",
        "superuser",
        "off",
        "enum",
        "Write-Ahead Log / Settings",
        "",
        "off",
        "Compresses full-page writes written in WAL file with specified method.",
    ),
    (
        "wal_consistency_checking",
        "superuser",
        "",
        "string",
        "Developer Options",
        "",
        "",
        "Sets the WAL resource managers for which WAL consistency checks are done.",
    ),
    (
        "wal_decode_buffer_size",
        "postmaster",
        "512kB",
        "integer",
        "Write-Ahead Log / Recovery",
        "B",
        "524288",
        "Buffer size for reading ahead in the WAL during recovery.",
    ),
    (
        "wal_init_zero",
        "superuser",
        "on",
        "bool",
        "Write-Ahead Log / Settings",
        "",
        "on",
        "Writes zeroes to new WAL files before first use.",
    ),
    (
        "wal_keep_size",
        "sighup",
        "0",
        "integer",
        "Replication / Sending Servers",
        "MB",
        "0",
        "Sets the size of WAL files held for standby servers.",
    ),
    (
        "wal_level",
        "postmaster",
        "replica",
        "enum",
        "Write-Ahead Log / Settings",
        "",
        "replica",
        "Sets the level of information written to the WAL.",
    ),
    (
        "wal_log_hints",
        "postmaster",
        "off",
        "bool",
        "Write-Ahead Log / Settings",
        "",
        "off",
        "Writes full pages to WAL when first modified after a checkpoint, even for a non-critical modification.",
    ),
    (
        "wal_receiver_create_temp_slot",
        "sighup",
        "off",
        "bool",
        "Replication / Standby Servers",
        "",
        "off",
        "Sets whether a WAL receiver should create a temporary replication slot if no permanent slot is configured.",
    ),
    (
        "wal_receiver_status_interval",
        "sighup",
        "10s",
        "integer",
        "Replication / Standby Servers",
        "s",
        "10",
        "Sets the maximum interval between WAL receiver status reports to the sending server.",
    ),
    (
        "wal_receiver_timeout",
        "sighup",
        "1min",
        "integer",
        "Replication / Standby Servers",
        "ms",
        "60000",
        "Sets the maximum wait time to receive data from the sending server.",
    ),
    (
        "wal_recycle",
        "superuser",
        "on",
        "bool",
        "Write-Ahead Log / Settings",
        "",
        "on",
        "Recycles WAL files by renaming them.",
    ),
    (
        "wal_retrieve_retry_interval",
        "sighup",
        "5s",
        "integer",
        "Replication / Standby Servers",
        "ms",
        "5000",
        "Sets the time to wait before retrying to retrieve WAL after a failed attempt.",
    ),
    (
        "wal_segment_size",
        "internal",
        "16MB",
        "integer",
        "Preset Options",
        "B",
        "16777216",
        "Shows the size of write ahead log segments.",
    ),
    (
        "wal_sender_timeout",
        "user",
        "1min",
        "integer",
        "Replication / Sending Servers",
        "ms",
        "60000",
        "Sets the maximum time to wait for WAL replication.",
    ),
    (
        "wal_skip_threshold",
        "user",
        "2MB",
        "integer",
        "Write-Ahead Log / Settings",
        "kB",
        "2048",
        "Minimum size of new file to fsync instead of writing WAL.",
    ),
    (
        "wal_summary_keep_time",
        "sighup",
        "10d",
        "integer",
        "Write-Ahead Log / Summarization",
        "min",
        "14400",
        "Time for which WAL summary files should be kept.",
    ),
    (
        "wal_sync_method",
        "sighup",
        "fdatasync",
        "enum",
        "Write-Ahead Log / Settings",
        "",
        "fdatasync",
        "Selects the method used for forcing WAL updates to disk.",
    ),
    (
        "wal_writer_delay",
        "sighup",
        "200ms",
        "integer",
        "Write-Ahead Log / Settings",
        "ms",
        "200",
        "Time between WAL flushes performed in the WAL writer.",
    ),
    (
        "wal_writer_flush_after",
        "sighup",
        "1MB",
        "integer",
        "Write-Ahead Log / Settings",
        "8kB",
        "128",
        "Amount of WAL written out by WAL writer that triggers a flush.",
    ),
    (
        "work_mem",
        "user",
        "4MB",
        "integer",
        "Resource Usage / Memory",
        "kB",
        "4096",
        "Sets the maximum memory to be used for query workspaces.",
    ),
    (
        "xmlbinary",
        "user",
        "base64",
        "enum",
        "Client Connection Defaults / Statement Behavior",
        "",
        "base64",
        "Sets how binary values are to be encoded in XML.",
    ),
    (
        "xmloption",
        "user",
        "content",
        "enum",
        "Client Connection Defaults / Statement Behavior",
        "",
        "content",
        "Sets whether XML data in implicit parsing and serialization operations is to be considered as documents or content fragments.",
    ),
    (
        "zero_damaged_pages",
        "superuser",
        "off",
        "bool",
        "Developer Options",
        "",
        "off",
        "Continues processing past damaged page headers.",
    ),
];

/// The context `name` may be changed in, or `None` when PG18 has no such
/// parameter.
pub(crate) fn guc_context(name: &str) -> Option<&'static str> {
    guc_entry(name).map(|e| e.1)
}

/// v7.39 (round 534) — the compiled-in default PG18 reports for a
/// parameter.
///
/// Round 474 decided that `pg_settings` lists only the parameters SPG
/// actually reads, so that reporting a knob does not tell a tuning tool
/// that turning it does something. That decision stands. What it left
/// open is the READ path: `current_setting('block_size')` answered an
/// EMPTY STRING where PG answers `8192`, and `SHOW random_page_cost`
/// printed nothing at all.
///
/// An empty string is the worst of the three possible answers. It is
/// not the value, and it is not an error a caller can branch on — a
/// tool doing `current_setting('block_size')::int` gets a cast failure
/// or silently reads zero.
///
/// SPG already ACCEPTS `SET random_page_cost = 3` (round 501), so the
/// session has a value for these names whether or not anything reads
/// them; reporting the stored configuration is what PG-compat asks for
/// and says nothing about behaviour that accepting the SET did not
/// already say.
pub(crate) fn guc_boot_value(name: &str) -> Option<&'static str> {
    guc_entry(name).map(|e| e.2)
}

/// `(name, context, default, vartype, category, unit, raw_default,
/// short_desc)`.
///
/// v7.38.18 (C5) — the default appears TWICE because PG renders it two
/// ways and both are load-bearing. `current_setting('max_wal_size')`
/// answers `1GB`; `pg_settings.setting` for the same parameter answers
/// `1024` with `unit = 'MB'`. Field 2 is the first, field 6 the second.
/// Collapsing them (which I did, briefly) makes `current_setting` return
/// a bare count that contradicts the human form every client expects.
type GucRow = (
    &'static str,
    &'static str,
    &'static str,
    &'static str,
    &'static str,
    &'static str,
    &'static str,
    &'static str,
);

/// v7.38.18 (C5) — PG 18.4's own one-line description, for `SHOW ALL`
/// and for `pg_settings.short_desc`, both of which used to have none.
pub(crate) fn guc_short_desc(name: &str) -> Option<&'static str> {
    guc_entry(name).map(|e| e.7)
}

fn guc_entry(name: &str) -> Option<&'static GucRow> {
    let lower = name.to_ascii_lowercase();
    PG_GUC_CONTEXTS
        .binary_search_by(|(n, ..)| (*n).cmp(lower.as_str()))
        .ok()
        .map(|i| &PG_GUC_CONTEXTS[i])
}

#[cfg(test)]
mod tests {
    use super::{PG_GUC_CONTEXTS, guc_boot_value, guc_context};

    /// v7.39 (round 534) — the table is binary-searched, so an
    /// out-of-order row makes names below it invisible and `SET` starts
    /// answering "unrecognized configuration parameter" for parameters
    /// that are right there. Regenerating it from a query ordered by the
    /// CONCATENATED row rather than by name did exactly that: `~`
    /// outranks `_`, so `lock_timeout` sorted after `lock_timeout_*`.
    #[test]
    fn table_is_strictly_sorted_by_name() {
        for w in PG_GUC_CONTEXTS.windows(2) {
            assert!(
                w[0].0 < w[1].0,
                "out of order: {:?} then {:?}",
                w[0].0,
                w[1].0
            );
        }
    }

    /// Every name is lowercase, which is what the lookup folds to.
    #[test]
    fn every_name_is_lowercase() {
        for (n, ..) in PG_GUC_CONTEXTS {
            assert_eq!(*n, n.to_ascii_lowercase(), "{n} is not lowercased");
        }
    }

    /// A spot check that both accessors reach the same row, including
    /// the mixed-case spellings PG uses.
    #[test]
    fn lookups_agree_and_fold_case() {
        assert_eq!(guc_context("TimeZone"), Some("user"));
        assert_eq!(guc_boot_value("block_size"), Some("8192"));
        assert_eq!(guc_boot_value("BLOCK_SIZE"), Some("8192"));
        assert_eq!(guc_context("nosuchknob"), None);
        assert_eq!(guc_boot_value("nosuchknob"), None);
    }
}