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 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932
|
# Reference
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->
## Table of Contents
### Classes
#### Public Classes
* [`postgresql::client`](#postgresql--client): Installs PostgreSQL client software. Set the following parameters if you have a custom version you would like to install.
* [`postgresql::globals`](#postgresql--globals): Class for setting cross-class global overrides.
* [`postgresql::lib::devel`](#postgresql--lib--devel): This class installs postgresql development libraries.
* [`postgresql::lib::docs`](#postgresql--lib--docs): Installs PostgreSQL bindings for Postgres-Docs. Set the following parameters if you have a custom version you would like to install.
* [`postgresql::lib::java`](#postgresql--lib--java): This class installs the postgresql jdbc connector.
* [`postgresql::lib::perl`](#postgresql--lib--perl): This class installs the perl libs for postgresql.
* [`postgresql::lib::python`](#postgresql--lib--python): This class installs the python libs for postgresql.
* [`postgresql::server`](#postgresql--server): This installs a PostgreSQL server
* [`postgresql::server::contrib`](#postgresql--server--contrib): Install the contrib postgresql packaging.
* [`postgresql::server::plperl`](#postgresql--server--plperl): This class installs the PL/Perl procedural language for postgresql.
* [`postgresql::server::plpython`](#postgresql--server--plpython): This class installs the PL/Python procedural language for postgresql.
* [`postgresql::server::postgis`](#postgresql--server--postgis): Install the postgis postgresql packaging.
#### Private Classes
* `postgresql::backup::pg_dump`: "Provider" for pg_dump backup
* `postgresql::dnfmodule`: Manage the DNF module
* `postgresql::params`
* `postgresql::repo`
* `postgresql::repo::apt_postgresql_org`
* `postgresql::repo::yum_postgresql_org`
* `postgresql::server::config`
* `postgresql::server::initdb`
* `postgresql::server::install`
* `postgresql::server::late_initdb`: Manage the default encoding when database initialization is managed by the package
* `postgresql::server::passwd`
* `postgresql::server::reload`
* `postgresql::server::service`
### Defined types
#### Public Defined types
* [`postgresql::server::config_entry`](#postgresql--server--config_entry): Manage a postgresql.conf entry.
* [`postgresql::server::database`](#postgresql--server--database): Define for creating a database.
* [`postgresql::server::database_grant`](#postgresql--server--database_grant): Manage a database grant.
* [`postgresql::server::db`](#postgresql--server--db): Define for conveniently creating a role, database and assigning the correct permissions.
* [`postgresql::server::default_privileges`](#postgresql--server--default_privileges): Manage a database defaults privileges. Only works with PostgreSQL version 9.6 and above.
* [`postgresql::server::extension`](#postgresql--server--extension): Activate an extension on a postgresql database.
* [`postgresql::server::grant`](#postgresql--server--grant): Define for granting permissions to roles.
* [`postgresql::server::grant_role`](#postgresql--server--grant_role): Define for granting membership to a role.
* [`postgresql::server::instance::config`](#postgresql--server--instance--config): Manages the config for a postgresql::server instance
* [`postgresql::server::instance::initdb`](#postgresql--server--instance--initdb): Manages initdb feature for a postgresql::server instance
* [`postgresql::server::instance::late_initdb`](#postgresql--server--instance--late_initdb): Manage the default encoding when database initialization is managed by the package
* [`postgresql::server::instance::passwd`](#postgresql--server--instance--passwd): Overrides the default PostgreSQL superuser
* [`postgresql::server::instance::reload`](#postgresql--server--instance--reload): Overrides the default reload or status command for your PostgreSQL service
* [`postgresql::server::instance::service`](#postgresql--server--instance--service): Manages the service for the postgres main instance (default) or additional instances
* [`postgresql::server::pg_hba_rule`](#postgresql--server--pg_hba_rule): This resource manages an individual rule that applies to the file defined in target.
* [`postgresql::server::pg_ident_rule`](#postgresql--server--pg_ident_rule): This resource manages an individual rule that applies to the file defined in target.
* [`postgresql::server::reassign_owned_by`](#postgresql--server--reassign_owned_by): Define for reassigning the ownership of objects within a database.
* [`postgresql::server::recovery`](#postgresql--server--recovery): This resource manages the parameters that applies to the recovery.conf template.
* [`postgresql::server::role`](#postgresql--server--role): Define for creating a database role.
* [`postgresql::server::schema`](#postgresql--server--schema): Create a new schema.
* [`postgresql::server::table_grant`](#postgresql--server--table_grant): This resource wraps the grant resource to manage table grants specifically.
* [`postgresql::server::tablespace`](#postgresql--server--tablespace): This module creates tablespace.
* [`postgresql::server_instance`](#postgresql--server_instance): define to install and manage additional postgresql instances
#### Private Defined types
* `postgresql::server::instance::systemd`: This define handles systemd drop-in files for the postgres main instance (default) or additional instances
### Resource types
* [`postgresql_conf`](#postgresql_conf): This type allows puppet to manage postgresql.conf parameters.
* [`postgresql_conn_validator`](#postgresql_conn_validator): Verify if a connection can be successfully established
* [`postgresql_psql`](#postgresql_psql): An arbitrary tag for your own reference; the name of the message.
* [`postgresql_replication_slot`](#postgresql_replication_slot): Manages Postgresql replication slots.
### Functions
#### Public Functions
* [`postgresql::default`](#postgresql--default): This function pull default values from the `params` class or `globals` class if the value is not present in `params`.
* [`postgresql::postgresql_escape`](#postgresql--postgresql_escape): This function escapes a string using [Dollar Quoting](https://www.postgresql.org/docs/12/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING) using a randomly generated tag if required.
* [`postgresql::postgresql_password`](#postgresql--postgresql_password): This function returns the postgresql password hash from the clear text username / password
* [`postgresql::prepend_sql_password`](#postgresql--prepend_sql_password): This function exists for usage of a role password that is a deferred function
* [`postgresql_escape`](#postgresql_escape): DEPRECATED. Use the namespaced function [`postgresql::postgresql_escape`](#postgresqlpostgresql_escape) instead.
* [`postgresql_password`](#postgresql_password): DEPRECATED. Use the namespaced function [`postgresql::postgresql_password`](#postgresqlpostgresql_password) instead.
#### Private Functions
* `postgresql::postgresql_acls_to_resources_hash`: This internal function translates the ipv(4|6)acls format into a resource suitable for create_resources.
### Data types
* [`Postgresql::Pg_hba_rule`](#Postgresql--Pg_hba_rule): type for all parameters in the postgresql::server::hba_rule defined resource
* [`Postgresql::Pg_hba_rule_address`](#Postgresql--Pg_hba_rule_address): Supported address types
* [`Postgresql::Pg_hba_rule_type`](#Postgresql--Pg_hba_rule_type): enum for all different types for the pg_hba_conf
* [`Postgresql::Pg_hba_rules`](#Postgresql--Pg_hba_rules): validates a hash of entries for postgresql::server::pg_hab_conf
* [`Postgresql::Pg_password_encryption`](#Postgresql--Pg_password_encryption): the supported password_encryption
### Tasks
* [`sql`](#sql): Allows you to execute arbitary SQL
## Classes
### <a name="postgresql--client"></a>`postgresql::client`
Installs PostgreSQL client software. Set the following parameters if you have a custom version you would like to install.
* **Note** Make sure to add any necessary yum or apt repositories if specifying a custom version.
#### Parameters
The following parameters are available in the `postgresql::client` class:
* [`file_ensure`](#-postgresql--client--file_ensure)
* [`validcon_script_path`](#-postgresql--client--validcon_script_path)
* [`package_name`](#-postgresql--client--package_name)
* [`package_ensure`](#-postgresql--client--package_ensure)
##### <a name="-postgresql--client--file_ensure"></a>`file_ensure`
Data type: `Enum['file', 'absent']`
Ensure the connection validation script is present
Default value: `'file'`
##### <a name="-postgresql--client--validcon_script_path"></a>`validcon_script_path`
Data type: `Stdlib::Absolutepath`
Optional. Absolute path for the postgresql connection validation script.
Default value: `$postgresql::params::validcon_script_path`
##### <a name="-postgresql--client--package_name"></a>`package_name`
Data type: `String[1]`
Sets the name of the PostgreSQL client package.
Default value: `$postgresql::params::client_package_name`
##### <a name="-postgresql--client--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Ensure the client package is installed
Default value: `'present'`
### <a name="postgresql--globals"></a>`postgresql::globals`
Class for setting cross-class global overrides.
* **Note** Most server-specific defaults should be overridden in the postgresql::server class.
This class should be used only if you are using a non-standard OS, or if you are changing elements that can only be changed here, such
as version or manage_package_repo.
#### Parameters
The following parameters are available in the `postgresql::globals` class:
* [`client_package_name`](#-postgresql--globals--client_package_name)
* [`server_package_name`](#-postgresql--globals--server_package_name)
* [`contrib_package_name`](#-postgresql--globals--contrib_package_name)
* [`devel_package_name`](#-postgresql--globals--devel_package_name)
* [`java_package_name`](#-postgresql--globals--java_package_name)
* [`docs_package_name`](#-postgresql--globals--docs_package_name)
* [`perl_package_name`](#-postgresql--globals--perl_package_name)
* [`plperl_package_name`](#-postgresql--globals--plperl_package_name)
* [`plpython_package_name`](#-postgresql--globals--plpython_package_name)
* [`python_package_name`](#-postgresql--globals--python_package_name)
* [`postgis_package_name`](#-postgresql--globals--postgis_package_name)
* [`service_name`](#-postgresql--globals--service_name)
* [`service_provider`](#-postgresql--globals--service_provider)
* [`service_status`](#-postgresql--globals--service_status)
* [`default_database`](#-postgresql--globals--default_database)
* [`validcon_script_path`](#-postgresql--globals--validcon_script_path)
* [`initdb_path`](#-postgresql--globals--initdb_path)
* [`psql_path`](#-postgresql--globals--psql_path)
* [`pg_hba_conf_path`](#-postgresql--globals--pg_hba_conf_path)
* [`pg_ident_conf_path`](#-postgresql--globals--pg_ident_conf_path)
* [`postgresql_conf_path`](#-postgresql--globals--postgresql_conf_path)
* [`postgresql_conf_mode`](#-postgresql--globals--postgresql_conf_mode)
* [`recovery_conf_path`](#-postgresql--globals--recovery_conf_path)
* [`default_connect_settings`](#-postgresql--globals--default_connect_settings)
* [`pg_hba_conf_defaults`](#-postgresql--globals--pg_hba_conf_defaults)
* [`datadir`](#-postgresql--globals--datadir)
* [`confdir`](#-postgresql--globals--confdir)
* [`bindir`](#-postgresql--globals--bindir)
* [`xlogdir`](#-postgresql--globals--xlogdir)
* [`logdir`](#-postgresql--globals--logdir)
* [`log_line_prefix`](#-postgresql--globals--log_line_prefix)
* [`user`](#-postgresql--globals--user)
* [`group`](#-postgresql--globals--group)
* [`version`](#-postgresql--globals--version)
* [`postgis_version`](#-postgresql--globals--postgis_version)
* [`repo_proxy`](#-postgresql--globals--repo_proxy)
* [`repo_baseurl`](#-postgresql--globals--repo_baseurl)
* [`yum_repo_commonurl`](#-postgresql--globals--yum_repo_commonurl)
* [`apt_source_release`](#-postgresql--globals--apt_source_release)
* [`needs_initdb`](#-postgresql--globals--needs_initdb)
* [`encoding`](#-postgresql--globals--encoding)
* [`locale`](#-postgresql--globals--locale)
* [`data_checksums`](#-postgresql--globals--data_checksums)
* [`timezone`](#-postgresql--globals--timezone)
* [`password_encryption`](#-postgresql--globals--password_encryption)
* [`manage_pg_hba_conf`](#-postgresql--globals--manage_pg_hba_conf)
* [`manage_pg_ident_conf`](#-postgresql--globals--manage_pg_ident_conf)
* [`manage_recovery_conf`](#-postgresql--globals--manage_recovery_conf)
* [`manage_postgresql_conf_perms`](#-postgresql--globals--manage_postgresql_conf_perms)
* [`manage_selinux`](#-postgresql--globals--manage_selinux)
* [`manage_datadir`](#-postgresql--globals--manage_datadir)
* [`manage_logdir`](#-postgresql--globals--manage_logdir)
* [`manage_xlogdir`](#-postgresql--globals--manage_xlogdir)
* [`manage_package_repo`](#-postgresql--globals--manage_package_repo)
* [`manage_dnf_module`](#-postgresql--globals--manage_dnf_module)
* [`module_workdir`](#-postgresql--globals--module_workdir)
##### <a name="-postgresql--globals--client_package_name"></a>`client_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL client package name.
Default value: `undef`
##### <a name="-postgresql--globals--server_package_name"></a>`server_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL server package name.
Default value: `undef`
##### <a name="-postgresql--globals--contrib_package_name"></a>`contrib_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL contrib package name.
Default value: `undef`
##### <a name="-postgresql--globals--devel_package_name"></a>`devel_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL devel package name.
Default value: `undef`
##### <a name="-postgresql--globals--java_package_name"></a>`java_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL java package name.
Default value: `undef`
##### <a name="-postgresql--globals--docs_package_name"></a>`docs_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL docs package name.
Default value: `undef`
##### <a name="-postgresql--globals--perl_package_name"></a>`perl_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL Perl package name.
Default value: `undef`
##### <a name="-postgresql--globals--plperl_package_name"></a>`plperl_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL PL/Perl package name.
Default value: `undef`
##### <a name="-postgresql--globals--plpython_package_name"></a>`plpython_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL PL/Python package name.
Default value: `undef`
##### <a name="-postgresql--globals--python_package_name"></a>`python_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL Python package name.
Default value: `undef`
##### <a name="-postgresql--globals--postgis_package_name"></a>`postgis_package_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL PostGIS package name.
Default value: `undef`
##### <a name="-postgresql--globals--service_name"></a>`service_name`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL service name.
Default value: `undef`
##### <a name="-postgresql--globals--service_provider"></a>`service_provider`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL service provider.
Default value: `undef`
##### <a name="-postgresql--globals--service_status"></a>`service_status`
Data type: `Optional[String[1]]`
Overrides the default status check command for your PostgreSQL service.
Default value: `undef`
##### <a name="-postgresql--globals--default_database"></a>`default_database`
Data type: `Optional[String[1]]`
Specifies the name of the default database to connect with.
Default value: `undef`
##### <a name="-postgresql--globals--validcon_script_path"></a>`validcon_script_path`
Data type: `Optional[String[1]]`
Scipt path for the connection validation check.
Default value: `undef`
##### <a name="-postgresql--globals--initdb_path"></a>`initdb_path`
Data type: `Optional[Stdlib::Absolutepath]`
Path to the initdb command.
Default value: `undef`
##### <a name="-postgresql--globals--psql_path"></a>`psql_path`
Data type: `Optional[Stdlib::Absolutepath]`
Sets the path to the psql command.
Default value: `undef`
##### <a name="-postgresql--globals--pg_hba_conf_path"></a>`pg_hba_conf_path`
Data type: `Optional[Stdlib::Absolutepath]`
Specifies the path to your pg_hba.conf file.
Default value: `undef`
##### <a name="-postgresql--globals--pg_ident_conf_path"></a>`pg_ident_conf_path`
Data type: `Optional[Stdlib::Absolutepath]`
Specifies the path to your pg_ident.conf file.
Default value: `undef`
##### <a name="-postgresql--globals--postgresql_conf_path"></a>`postgresql_conf_path`
Data type: `Optional[Stdlib::Absolutepath]`
Sets the path to your postgresql.conf file.
Default value: `undef`
##### <a name="-postgresql--globals--postgresql_conf_mode"></a>`postgresql_conf_mode`
Data type: `Optional[Stdlib::Filemode]`
Sets the mode of your postgresql.conf file. Only relevant if manage_postgresql_conf_perms is true.
Default value: `undef`
##### <a name="-postgresql--globals--recovery_conf_path"></a>`recovery_conf_path`
Data type: `Optional[Stdlib::Absolutepath]`
Path to your recovery.conf file.
Default value: `undef`
##### <a name="-postgresql--globals--default_connect_settings"></a>`default_connect_settings`
Data type: `Hash`
Default connection settings.
Default value: `{}`
##### <a name="-postgresql--globals--pg_hba_conf_defaults"></a>`pg_hba_conf_defaults`
Data type: `Optional[Boolean]`
Disables the defaults supplied with the module for pg_hba.conf if set to false.
Default value: `undef`
##### <a name="-postgresql--globals--datadir"></a>`datadir`
Data type: `Optional[Stdlib::Absolutepath]`
Overrides the default PostgreSQL data directory for the target platform.
Changing the datadir after installation causes the server to come to a full stop before making the change.
For Red Hat systems, the data directory must be labeled appropriately for SELinux.
On Ubuntu, you must explicitly set needs_initdb = true to allow Puppet to initialize the database in the new datadir (needs_initdb
defaults to true on other systems).
Warning! If datadir is changed from the default, Puppet does not manage purging of the original data directory, which causes it to fail
if the data directory is changed back to the original
Default value: `undef`
##### <a name="-postgresql--globals--confdir"></a>`confdir`
Data type: `Optional[Stdlib::Absolutepath]`
Overrides the default PostgreSQL configuration directory for the target platform.
Default value: `undef`
##### <a name="-postgresql--globals--bindir"></a>`bindir`
Data type: `Optional[Stdlib::Absolutepath]`
Overrides the default PostgreSQL binaries directory for the target platform.
Default value: `undef`
##### <a name="-postgresql--globals--xlogdir"></a>`xlogdir`
Data type: `Optional[Stdlib::Absolutepath]`
Overrides the default PostgreSQL xlog directory.
Default value: `undef`
##### <a name="-postgresql--globals--logdir"></a>`logdir`
Data type: `Optional[Stdlib::Absolutepath]`
Overrides the default PostgreSQL log directory.
Default value: `undef`
##### <a name="-postgresql--globals--log_line_prefix"></a>`log_line_prefix`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL log prefix.
Default value: `undef`
##### <a name="-postgresql--globals--user"></a>`user`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `undef`
##### <a name="-postgresql--globals--group"></a>`group`
Data type: `Optional[String[1]]`
Overrides the default postgres user group to be used for related files in the file system.
Default value: `undef`
##### <a name="-postgresql--globals--version"></a>`version`
Data type: `Optional[String[1]]`
The version of PostgreSQL to install and manage.
Default value: `undef`
##### <a name="-postgresql--globals--postgis_version"></a>`postgis_version`
Data type: `Optional[String[1]]`
Defines the version of PostGIS to install, if you install PostGIS.
Default value: `undef`
##### <a name="-postgresql--globals--repo_proxy"></a>`repo_proxy`
Data type: `Optional[String[1]]`
Sets the proxy option for the official PostgreSQL yum-repositories only.
Default value: `undef`
##### <a name="-postgresql--globals--repo_baseurl"></a>`repo_baseurl`
Data type: `Optional[String[1]]`
Sets the baseurl for the PostgreSQL repository. Useful if you host your own mirror of the repository.
Default value: `undef`
##### <a name="-postgresql--globals--yum_repo_commonurl"></a>`yum_repo_commonurl`
Data type: `Optional[String[1]]`
Sets the url for the PostgreSQL common Yum repository. Useful if you host your own mirror of the YUM repository.
Default value: `undef`
##### <a name="-postgresql--globals--apt_source_release"></a>`apt_source_release`
Data type: `Optional[String[1]]`
Overrides the default release for the apt source.
Default value: `undef`
##### <a name="-postgresql--globals--needs_initdb"></a>`needs_initdb`
Data type: `Optional[Boolean]`
Explicitly calls the initdb operation after the server package is installed and before the PostgreSQL service is started.
Default value: `undef`
##### <a name="-postgresql--globals--encoding"></a>`encoding`
Data type: `Optional[String[1]]`
Sets the default encoding for all databases created with this module.
On certain operating systems, this is also used during the template1 initialization,
so it becomes a default outside of the module as well.
Default value: `undef`
##### <a name="-postgresql--globals--locale"></a>`locale`
Data type: `Optional[String[1]]`
Sets the default database locale for all databases created with this module.
On certain operating systems, this is also used during the template1 initialization,
so it becomes a default outside of the module as well.
On Debian, you'll need to ensure that the 'locales-all' package is installed for full functionality of PostgreSQL.
Default value: `undef`
##### <a name="-postgresql--globals--data_checksums"></a>`data_checksums`
Data type: `Optional[Boolean]`
Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent.
Warning: This option is used during initialization by initdb, and cannot be changed later.
Default value: `undef`
##### <a name="-postgresql--globals--timezone"></a>`timezone`
Data type: `Optional[String[1]]`
Sets the default timezone of the postgresql server. The postgresql built-in default is taking the systems timezone information.
Default value: `undef`
##### <a name="-postgresql--globals--password_encryption"></a>`password_encryption`
Data type: `Optional[Postgresql::Pg_password_encryption]`
Specify the type of encryption set for the password.
Defaults to scram-sha-256 for PostgreSQL >= 14, otherwise md5.
Default value: `undef`
##### <a name="-postgresql--globals--manage_pg_hba_conf"></a>`manage_pg_hba_conf`
Data type: `Optional[Boolean]`
Allow Puppet to manage the pg_hba.conf file.
Default value: `undef`
##### <a name="-postgresql--globals--manage_pg_ident_conf"></a>`manage_pg_ident_conf`
Data type: `Optional[Boolean]`
Allow Puppet to manage the pg_ident.conf file.
Default value: `undef`
##### <a name="-postgresql--globals--manage_recovery_conf"></a>`manage_recovery_conf`
Data type: `Optional[Boolean]`
Allow Puppet to manage the recovery.conf file.
Default value: `undef`
##### <a name="-postgresql--globals--manage_postgresql_conf_perms"></a>`manage_postgresql_conf_perms`
Data type: `Optional[Boolean]`
Whether to manage the postgresql conf file permissions. This means owner,
group and mode. Contents are not managed but should be managed through
postgresql::server::config_entry.
Default value: `undef`
##### <a name="-postgresql--globals--manage_selinux"></a>`manage_selinux`
Data type: `Optional[Boolean]`
Allows Puppet to manage the appropriate configuration file for selinux.
Default value: `undef`
##### <a name="-postgresql--globals--manage_datadir"></a>`manage_datadir`
Data type: `Optional[Boolean]`
Set to false if you have file{ $datadir: } already defined
Default value: `undef`
##### <a name="-postgresql--globals--manage_logdir"></a>`manage_logdir`
Data type: `Optional[Boolean]`
Set to false if you have file{ $logdir: } already defined
Default value: `undef`
##### <a name="-postgresql--globals--manage_xlogdir"></a>`manage_xlogdir`
Data type: `Optional[Boolean]`
Set to false if you have file{ $xlogdir: } already defined
Default value: `undef`
##### <a name="-postgresql--globals--manage_package_repo"></a>`manage_package_repo`
Data type: `Optional[Boolean]`
Sets up official PostgreSQL repositories on your host if set to true.
Default value: `undef`
##### <a name="-postgresql--globals--manage_dnf_module"></a>`manage_dnf_module`
Data type: `Boolean`
Manage the DNF module. This only makes sense on distributions that use DNF
package manager, such as EL8, EL9 or Fedora.
Default value: `false`
##### <a name="-postgresql--globals--module_workdir"></a>`module_workdir`
Data type: `Optional[Stdlib::Absolutepath]`
Specifies working directory under which the psql command should be executed.
May need to specify if '/tmp' is on volume mounted with noexec option.
Default value: `undef`
### <a name="postgresql--lib--devel"></a>`postgresql::lib::devel`
This class installs postgresql development libraries.
#### Parameters
The following parameters are available in the `postgresql::lib::devel` class:
* [`package_name`](#-postgresql--lib--devel--package_name)
* [`package_ensure`](#-postgresql--lib--devel--package_ensure)
* [`link_pg_config`](#-postgresql--lib--devel--link_pg_config)
##### <a name="-postgresql--lib--devel--package_name"></a>`package_name`
Data type: `String`
Override devel package name
Default value: `$postgresql::params::devel_package_name`
##### <a name="-postgresql--lib--devel--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Ensure the development libraries are installed
Default value: `'present'`
##### <a name="-postgresql--lib--devel--link_pg_config"></a>`link_pg_config`
Data type: `Boolean`
If the bin directory used by the PostgreSQL page is not /usr/bin or /usr/local/bin, symlinks pg_config from the package's bin dir
into usr/bin (not applicable to Debian systems). Set to false to disable this behavior.
Default value: `$postgresql::params::link_pg_config`
### <a name="postgresql--lib--docs"></a>`postgresql::lib::docs`
Installs PostgreSQL bindings for Postgres-Docs. Set the following parameters if you have a custom version you would like to install.
* **Note** Make sure to add any necessary yum or apt repositories if specifying a custom version.
#### Parameters
The following parameters are available in the `postgresql::lib::docs` class:
* [`package_name`](#-postgresql--lib--docs--package_name)
* [`package_ensure`](#-postgresql--lib--docs--package_ensure)
##### <a name="-postgresql--lib--docs--package_name"></a>`package_name`
Data type: `String`
Specifies the name of the PostgreSQL docs package.
Default value: `$postgresql::params::docs_package_name`
##### <a name="-postgresql--lib--docs--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Whether the PostgreSQL docs package resource should be present.
Default value: `'present'`
### <a name="postgresql--lib--java"></a>`postgresql::lib::java`
This class installs the postgresql jdbc connector.
* **Note** Make sure to add any necessary yum or apt repositories if specifying a custom version.
#### Parameters
The following parameters are available in the `postgresql::lib::java` class:
* [`package_name`](#-postgresql--lib--java--package_name)
* [`package_ensure`](#-postgresql--lib--java--package_ensure)
##### <a name="-postgresql--lib--java--package_name"></a>`package_name`
Data type: `String`
Specifies the name of the PostgreSQL java package.
Default value: `$postgresql::params::java_package_name`
##### <a name="-postgresql--lib--java--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Specifies whether the package is present.
Default value: `'present'`
### <a name="postgresql--lib--perl"></a>`postgresql::lib::perl`
This class installs the perl libs for postgresql.
#### Parameters
The following parameters are available in the `postgresql::lib::perl` class:
* [`package_name`](#-postgresql--lib--perl--package_name)
* [`package_ensure`](#-postgresql--lib--perl--package_ensure)
##### <a name="-postgresql--lib--perl--package_name"></a>`package_name`
Data type: `String`
Specifies the name of the PostgreSQL perl package to install.
Default value: `$postgresql::params::perl_package_name`
##### <a name="-postgresql--lib--perl--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Ensure the perl libs for postgresql are installed.
Default value: `'present'`
### <a name="postgresql--lib--python"></a>`postgresql::lib::python`
This class installs the python libs for postgresql.
#### Parameters
The following parameters are available in the `postgresql::lib::python` class:
* [`package_name`](#-postgresql--lib--python--package_name)
* [`package_ensure`](#-postgresql--lib--python--package_ensure)
##### <a name="-postgresql--lib--python--package_name"></a>`package_name`
Data type: `String[1]`
The name of the PostgreSQL Python package.
Default value: `$postgresql::params::python_package_name`
##### <a name="-postgresql--lib--python--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Ensure the python libs for postgresql are installed.
Default value: `'present'`
### <a name="postgresql--server"></a>`postgresql::server`
This installs a PostgreSQL server
#### Parameters
The following parameters are available in the `postgresql::server` class:
* [`postgres_password`](#-postgresql--server--postgres_password)
* [`package_name`](#-postgresql--server--package_name)
* [`package_ensure`](#-postgresql--server--package_ensure)
* [`plperl_package_name`](#-postgresql--server--plperl_package_name)
* [`plpython_package_name`](#-postgresql--server--plpython_package_name)
* [`service_ensure`](#-postgresql--server--service_ensure)
* [`service_enable`](#-postgresql--server--service_enable)
* [`service_manage`](#-postgresql--server--service_manage)
* [`service_name`](#-postgresql--server--service_name)
* [`service_restart_on_change`](#-postgresql--server--service_restart_on_change)
* [`service_provider`](#-postgresql--server--service_provider)
* [`service_reload`](#-postgresql--server--service_reload)
* [`service_status`](#-postgresql--server--service_status)
* [`default_database`](#-postgresql--server--default_database)
* [`default_connect_settings`](#-postgresql--server--default_connect_settings)
* [`listen_addresses`](#-postgresql--server--listen_addresses)
* [`port`](#-postgresql--server--port)
* [`ip_mask_deny_postgres_user`](#-postgresql--server--ip_mask_deny_postgres_user)
* [`ip_mask_allow_all_users`](#-postgresql--server--ip_mask_allow_all_users)
* [`ipv4acls`](#-postgresql--server--ipv4acls)
* [`ipv6acls`](#-postgresql--server--ipv6acls)
* [`initdb_path`](#-postgresql--server--initdb_path)
* [`psql_path`](#-postgresql--server--psql_path)
* [`pg_hba_conf_path`](#-postgresql--server--pg_hba_conf_path)
* [`pg_ident_conf_path`](#-postgresql--server--pg_ident_conf_path)
* [`postgresql_conf_path`](#-postgresql--server--postgresql_conf_path)
* [`postgresql_conf_mode`](#-postgresql--server--postgresql_conf_mode)
* [`recovery_conf_path`](#-postgresql--server--recovery_conf_path)
* [`datadir`](#-postgresql--server--datadir)
* [`xlogdir`](#-postgresql--server--xlogdir)
* [`logdir`](#-postgresql--server--logdir)
* [`log_line_prefix`](#-postgresql--server--log_line_prefix)
* [`pg_hba_conf_defaults`](#-postgresql--server--pg_hba_conf_defaults)
* [`user`](#-postgresql--server--user)
* [`group`](#-postgresql--server--group)
* [`needs_initdb`](#-postgresql--server--needs_initdb)
* [`encoding`](#-postgresql--server--encoding)
* [`locale`](#-postgresql--server--locale)
* [`data_checksums`](#-postgresql--server--data_checksums)
* [`timezone`](#-postgresql--server--timezone)
* [`manage_pg_hba_conf`](#-postgresql--server--manage_pg_hba_conf)
* [`manage_pg_ident_conf`](#-postgresql--server--manage_pg_ident_conf)
* [`manage_recovery_conf`](#-postgresql--server--manage_recovery_conf)
* [`manage_postgresql_conf_perms`](#-postgresql--server--manage_postgresql_conf_perms)
* [`manage_selinux`](#-postgresql--server--manage_selinux)
* [`module_workdir`](#-postgresql--server--module_workdir)
* [`manage_datadir`](#-postgresql--server--manage_datadir)
* [`manage_logdir`](#-postgresql--server--manage_logdir)
* [`manage_xlogdir`](#-postgresql--server--manage_xlogdir)
* [`password_encryption`](#-postgresql--server--password_encryption)
* [`pg_hba_auth_password_encryption`](#-postgresql--server--pg_hba_auth_password_encryption)
* [`roles`](#-postgresql--server--roles)
* [`config_entries`](#-postgresql--server--config_entries)
* [`pg_hba_rules`](#-postgresql--server--pg_hba_rules)
* [`backup_enable`](#-postgresql--server--backup_enable)
* [`backup_options`](#-postgresql--server--backup_options)
* [`backup_provider`](#-postgresql--server--backup_provider)
* [`extra_systemd_config`](#-postgresql--server--extra_systemd_config)
* [`auth_host`](#-postgresql--server--auth_host)
* [`auth_local`](#-postgresql--server--auth_local)
* [`lc_messages`](#-postgresql--server--lc_messages)
* [`username`](#-postgresql--server--username)
##### <a name="-postgresql--server--postgres_password"></a>`postgres_password`
Data type: `Optional[Variant[String[1], Sensitive[String[1]], Integer]]`
Sets the password for the postgres user to your specified value. By default, this setting uses the superuser account in the Postgres
database, with a user called postgres and no password.
Default value: `undef`
##### <a name="-postgresql--server--package_name"></a>`package_name`
Data type: `String[1]`
Specifies the name of the package to use for installing the server software.
Default value: `$postgresql::params::server_package_name`
##### <a name="-postgresql--server--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Passes a value through to the package resource when creating the server instance.
Default value: `$postgresql::params::package_ensure`
##### <a name="-postgresql--server--plperl_package_name"></a>`plperl_package_name`
Data type: `Optional[String[1]]`
Sets the default package name for the PL/Perl extension.
Default value: `$postgresql::params::plperl_package_name`
##### <a name="-postgresql--server--plpython_package_name"></a>`plpython_package_name`
Data type: `Optional[String[1]]`
Sets the default package name for the PL/Python extension.
Default value: `$postgresql::params::plpython_package_name`
##### <a name="-postgresql--server--service_ensure"></a>`service_ensure`
Data type: `Variant[Enum['running', 'stopped'], Boolean]`
Ensure service is installed
Default value: `$postgresql::params::service_ensure`
##### <a name="-postgresql--server--service_enable"></a>`service_enable`
Data type: `Boolean`
Enable the PostgreSQL service
Default value: `$postgresql::params::service_enable`
##### <a name="-postgresql--server--service_manage"></a>`service_manage`
Data type: `Boolean`
Defines whether or not Puppet should manage the service.
Default value: `$postgresql::params::service_manage`
##### <a name="-postgresql--server--service_name"></a>`service_name`
Data type: `String[1]`
Overrides the default PostgreSQL service name.
Default value: `$postgresql::params::service_name`
##### <a name="-postgresql--server--service_restart_on_change"></a>`service_restart_on_change`
Data type: `Boolean`
Overrides the default behavior to restart your PostgreSQL service when a config entry has been changed that requires a service restart
to become active.
Default value: `$postgresql::params::service_restart_on_change`
##### <a name="-postgresql--server--service_provider"></a>`service_provider`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL service provider.
Default value: `$postgresql::params::service_provider`
##### <a name="-postgresql--server--service_reload"></a>`service_reload`
Data type: `String[1]`
Overrides the default reload command for your PostgreSQL service.
Default value: `$postgresql::params::service_reload`
##### <a name="-postgresql--server--service_status"></a>`service_status`
Data type: `Optional[String[1]]`
Overrides the default status check command for your PostgreSQL service.
Default value: `$postgresql::params::service_status`
##### <a name="-postgresql--server--default_database"></a>`default_database`
Data type: `String[1]`
Specifies the name of the default database to connect with. On most systems this is 'postgres'.
Default value: `$postgresql::params::default_database`
##### <a name="-postgresql--server--default_connect_settings"></a>`default_connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server. Becomes the default for other defined types, such as
postgresql::server::role.
Default value: `$postgresql::globals::default_connect_settings`
##### <a name="-postgresql--server--listen_addresses"></a>`listen_addresses`
Data type: `Optional[Variant[String[1], Array[String[1]]]]`
Address list on which the PostgreSQL service will listen
Default value: `$postgresql::params::listen_addresses`
##### <a name="-postgresql--server--port"></a>`port`
Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on.
Also, for Red Hat systems and early Debian systems, changing the port causes the server to come to a full stop before being able to make
the change.
Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
Default value: `$postgresql::params::port`
##### <a name="-postgresql--server--ip_mask_deny_postgres_user"></a>`ip_mask_deny_postgres_user`
Data type: `String[1]`
Specifies the IP mask from which remote connections should be denied for the postgres superuser.
Default value: '0.0.0.0/0', which denies any remote connection.
Default value: `$postgresql::params::ip_mask_deny_postgres_user`
##### <a name="-postgresql--server--ip_mask_allow_all_users"></a>`ip_mask_allow_all_users`
Data type: `String[1]`
Overrides PostgreSQL defaults for remote connections. By default, PostgreSQL does not allow database user accounts to connect via TCP
from remote machines. If you'd like to allow this, you can override this setting.
Set to '0.0.0.0/0' to allow database users to connect from any remote machine, or '192.168.0.0/1' to allow connections from any machine
on your local '192.168' subnet.
Default value: '127.0.0.1/32'.
Default value: `$postgresql::params::ip_mask_allow_all_users`
##### <a name="-postgresql--server--ipv4acls"></a>`ipv4acls`
Data type: `Array[String[1]]`
Lists strings for access control for connection method, users, databases, IPv4 addresses;
Default value: `$postgresql::params::ipv4acls`
##### <a name="-postgresql--server--ipv6acls"></a>`ipv6acls`
Data type: `Array[String[1]]`
Lists strings for access control for connection method, users, databases, IPv6 addresses.
Default value: `$postgresql::params::ipv6acls`
##### <a name="-postgresql--server--initdb_path"></a>`initdb_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to the initdb command.
Default value: `$postgresql::params::initdb_path`
##### <a name="-postgresql--server--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to the psql command.
Default value: `$postgresql::params::psql_path`
##### <a name="-postgresql--server--pg_hba_conf_path"></a>`pg_hba_conf_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to your pg_hba.conf file.
Default value: `$postgresql::params::pg_hba_conf_path`
##### <a name="-postgresql--server--pg_ident_conf_path"></a>`pg_ident_conf_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to your pg_ident.conf file.
Default value: `$postgresql::params::pg_ident_conf_path`
##### <a name="-postgresql--server--postgresql_conf_path"></a>`postgresql_conf_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to your postgresql.conf file.
Default value: `$postgresql::params::postgresql_conf_path`
##### <a name="-postgresql--server--postgresql_conf_mode"></a>`postgresql_conf_mode`
Data type: `Optional[Stdlib::Filemode]`
Sets the mode of your postgresql.conf file. Only relevant if manage_postgresql_conf_perms is true.
Default value: `$postgresql::params::postgresql_conf_mode`
##### <a name="-postgresql--server--recovery_conf_path"></a>`recovery_conf_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to your recovery.conf file.
Default value: `$postgresql::params::recovery_conf_path`
##### <a name="-postgresql--server--datadir"></a>`datadir`
Data type: `Stdlib::Absolutepath`
PostgreSQL data directory
Default value: `$postgresql::params::datadir`
##### <a name="-postgresql--server--xlogdir"></a>`xlogdir`
Data type: `Optional[Stdlib::Absolutepath]`
PostgreSQL xlog directory
Default value: `$postgresql::params::xlogdir`
##### <a name="-postgresql--server--logdir"></a>`logdir`
Data type: `Optional[Stdlib::Absolutepath]`
PostgreSQL log directory
Default value: `$postgresql::params::logdir`
##### <a name="-postgresql--server--log_line_prefix"></a>`log_line_prefix`
Data type: `Optional[String[1]]`
PostgreSQL log line prefix
Default value: `$postgresql::params::log_line_prefix`
##### <a name="-postgresql--server--pg_hba_conf_defaults"></a>`pg_hba_conf_defaults`
Data type: `Boolean`
If false, disables the defaults supplied with the module for pg_hba.conf. This is useful if you disagree with the defaults and wish to
override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform
basic psql operations for example.
Default value: `$postgresql::params::pg_hba_conf_defaults`
##### <a name="-postgresql--server--user"></a>`user`
Data type: `String[1]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `$postgresql::params::user`
##### <a name="-postgresql--server--group"></a>`group`
Data type: `String[1]`
Overrides the default postgres user group to be used for related files in the file system.
Default value: `$postgresql::params::group`
##### <a name="-postgresql--server--needs_initdb"></a>`needs_initdb`
Data type: `Boolean`
Explicitly calls the initdb operation after server package is installed, and before the PostgreSQL service is started.
Default value: `$postgresql::params::needs_initdb`
##### <a name="-postgresql--server--encoding"></a>`encoding`
Data type: `Optional[String[1]]`
Sets the default encoding for all databases created with this module. On certain operating systems this is also used during the
template1 initialization, so it becomes a default outside of the module as well.
Default value: `$postgresql::params::encoding`
##### <a name="-postgresql--server--locale"></a>`locale`
Data type: `Optional[String[1]]`
Sets the default database locale for all databases created with this module. On certain operating systems this is used during the
template1 initialization as well, so it becomes a default outside of the module.
Default value: `$postgresql::params::locale`
##### <a name="-postgresql--server--data_checksums"></a>`data_checksums`
Data type: `Optional[Boolean]`
Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent.
Warning: This option is used during initialization by initdb, and cannot be changed later.
If set, checksums are calculated for all objects, in all databases.
Default value: `$postgresql::params::data_checksums`
##### <a name="-postgresql--server--timezone"></a>`timezone`
Data type: `Optional[String[1]]`
Set timezone for the PostgreSQL instance
Default value: `$postgresql::params::timezone`
##### <a name="-postgresql--server--manage_pg_hba_conf"></a>`manage_pg_hba_conf`
Data type: `Boolean`
Boolean. Whether to manage the pg_hba.conf.
Default value: `$postgresql::params::manage_pg_hba_conf`
##### <a name="-postgresql--server--manage_pg_ident_conf"></a>`manage_pg_ident_conf`
Data type: `Boolean`
Boolean. Overwrites the pg_ident.conf file.
Default value: `$postgresql::params::manage_pg_ident_conf`
##### <a name="-postgresql--server--manage_recovery_conf"></a>`manage_recovery_conf`
Data type: `Boolean`
Boolean. Specifies whether or not manage the recovery.conf.
Default value: `$postgresql::params::manage_recovery_conf`
##### <a name="-postgresql--server--manage_postgresql_conf_perms"></a>`manage_postgresql_conf_perms`
Data type: `Boolean`
Whether to manage the postgresql conf file permissions. This means owner,
group and mode. Contents are not managed but should be managed through
postgresql::server::config_entry.
Default value: `$postgresql::params::manage_postgresql_conf_perms`
##### <a name="-postgresql--server--manage_selinux"></a>`manage_selinux`
Data type: `Boolean`
Specifies whether or not manage the conf file for selinux.
Default value: `$postgresql::params::manage_selinux`
##### <a name="-postgresql--server--module_workdir"></a>`module_workdir`
Data type: `Stdlib::Absolutepath`
Working directory for the PostgreSQL module
Default value: `$postgresql::params::module_workdir`
##### <a name="-postgresql--server--manage_datadir"></a>`manage_datadir`
Data type: `Boolean`
Set to false if you have file{ $datadir: } already defined
Default value: `$postgresql::params::manage_datadir`
##### <a name="-postgresql--server--manage_logdir"></a>`manage_logdir`
Data type: `Boolean`
Set to false if you have file{ $logdir: } already defined
Default value: `$postgresql::params::manage_logdir`
##### <a name="-postgresql--server--manage_xlogdir"></a>`manage_xlogdir`
Data type: `Boolean`
Set to false if you have file{ $xlogdir: } already defined
Default value: `$postgresql::params::manage_xlogdir`
##### <a name="-postgresql--server--password_encryption"></a>`password_encryption`
Data type: `Postgresql::Pg_password_encryption`
Specify the type of encryption set for the password.
Default value: `$postgresql::params::password_encryption`
##### <a name="-postgresql--server--pg_hba_auth_password_encryption"></a>`pg_hba_auth_password_encryption`
Data type: `Optional[Postgresql::Pg_password_encryption]`
Specify the type of encryption set for the password in pg_hba_conf,
this value is usefull if you want to start enforcing scram-sha-256, but give users transition time.
Default value: `undef`
##### <a name="-postgresql--server--roles"></a>`roles`
Data type: `Hash[String, Hash]`
Specifies a hash from which to generate postgresql::server::role resources.
Default value: `{}`
##### <a name="-postgresql--server--config_entries"></a>`config_entries`
Data type: `Hash[String, Any]`
Specifies a hash from which to generate postgresql::server::config_entry resources.
Default value: `{}`
##### <a name="-postgresql--server--pg_hba_rules"></a>`pg_hba_rules`
Data type: `Postgresql::Pg_hba_rules`
Specifies a hash from which to generate postgresql::server::pg_hba_rule resources.
Default value: `{}`
##### <a name="-postgresql--server--backup_enable"></a>`backup_enable`
Data type: `Boolean`
Whether a backup job should be enabled.
Default value: `$postgresql::params::backup_enable`
##### <a name="-postgresql--server--backup_options"></a>`backup_options`
Data type: `Hash`
A hash of options that should be passed through to the backup provider.
Default value: `{}`
##### <a name="-postgresql--server--backup_provider"></a>`backup_provider`
Data type: `Enum['pg_dump']`
Specifies the backup provider to use.
Default value: `$postgresql::params::backup_provider`
##### <a name="-postgresql--server--extra_systemd_config"></a>`extra_systemd_config`
Data type: `Optional[String]`
Adds extra config to systemd config file, can for instance be used to add extra openfiles. This can be a multi line string
Default value: `$postgresql::params::extra_systemd_config`
##### <a name="-postgresql--server--auth_host"></a>`auth_host`
Data type: `Optional[String[1]]`
auth method used by default for host authorization
Default value: `undef`
##### <a name="-postgresql--server--auth_local"></a>`auth_local`
Data type: `Optional[String[1]]`
auth method used by default for local authorization
Default value: `undef`
##### <a name="-postgresql--server--lc_messages"></a>`lc_messages`
Data type: `Optional[String[1]]`
locale used for logging and system messages
Default value: `undef`
##### <a name="-postgresql--server--username"></a>`username`
Data type: `Optional[String[1]]`
username of user running the postgres instance
Default value: `$user`
### <a name="postgresql--server--contrib"></a>`postgresql::server::contrib`
Install the contrib postgresql packaging.
#### Parameters
The following parameters are available in the `postgresql::server::contrib` class:
* [`package_name`](#-postgresql--server--contrib--package_name)
* [`package_ensure`](#-postgresql--server--contrib--package_ensure)
##### <a name="-postgresql--server--contrib--package_name"></a>`package_name`
Data type: `Optional[String[1]]`
The name of the PostgreSQL contrib package.
Default value: `$postgresql::params::contrib_package_name`
##### <a name="-postgresql--server--contrib--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Ensure the contrib package is installed.
Default value: `'present'`
### <a name="postgresql--server--plperl"></a>`postgresql::server::plperl`
This class installs the PL/Perl procedural language for postgresql.
#### Parameters
The following parameters are available in the `postgresql::server::plperl` class:
* [`package_ensure`](#-postgresql--server--plperl--package_ensure)
* [`package_name`](#-postgresql--server--plperl--package_name)
##### <a name="-postgresql--server--plperl--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
The ensure parameter passed on to PostgreSQL PL/Perl package resource.
Default value: `'present'`
##### <a name="-postgresql--server--plperl--package_name"></a>`package_name`
Data type: `Optional[String[1]]`
The name of the PostgreSQL PL/Perl package.
Default value: `$postgresql::server::plperl_package_name`
### <a name="postgresql--server--plpython"></a>`postgresql::server::plpython`
This class installs the PL/Python procedural language for postgresql.
#### Parameters
The following parameters are available in the `postgresql::server::plpython` class:
* [`package_ensure`](#-postgresql--server--plpython--package_ensure)
* [`package_name`](#-postgresql--server--plpython--package_name)
##### <a name="-postgresql--server--plpython--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Specifies whether the package is present.
Default value: `'present'`
##### <a name="-postgresql--server--plpython--package_name"></a>`package_name`
Data type: `Optional[String[1]]`
Specifies the name of the postgresql PL/Python package.
Default value: `$postgresql::server::plpython_package_name`
### <a name="postgresql--server--postgis"></a>`postgresql::server::postgis`
Install the postgis postgresql packaging.
#### Parameters
The following parameters are available in the `postgresql::server::postgis` class:
* [`package_name`](#-postgresql--server--postgis--package_name)
* [`package_ensure`](#-postgresql--server--postgis--package_ensure)
##### <a name="-postgresql--server--postgis--package_name"></a>`package_name`
Data type: `String`
Sets the package name.
Default value: `$postgresql::params::postgis_package_name`
##### <a name="-postgresql--server--postgis--package_ensure"></a>`package_ensure`
Data type: `Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]`
Specifies if the package is present or not.
Default value: `'present'`
## Defined types
### <a name="postgresql--server--config_entry"></a>`postgresql::server::config_entry`
Manage a postgresql.conf entry.
#### Parameters
The following parameters are available in the `postgresql::server::config_entry` defined type:
* [`ensure`](#-postgresql--server--config_entry--ensure)
* [`key`](#-postgresql--server--config_entry--key)
* [`value`](#-postgresql--server--config_entry--value)
* [`path`](#-postgresql--server--config_entry--path)
* [`comment`](#-postgresql--server--config_entry--comment)
* [`instance_name`](#-postgresql--server--config_entry--instance_name)
##### <a name="-postgresql--server--config_entry--ensure"></a>`ensure`
Data type: `Enum['present', 'absent']`
Removes an entry if set to 'absent'.
Default value: `'present'`
##### <a name="-postgresql--server--config_entry--key"></a>`key`
Data type: `String[1]`
Defines the key/name for the setting. Defaults to $name
Default value: `$name`
##### <a name="-postgresql--server--config_entry--value"></a>`value`
Data type: `Optional[Variant[String[1], Numeric, Array[String[1]]]]`
Defines the value for the setting.
Default value: `undef`
##### <a name="-postgresql--server--config_entry--path"></a>`path`
Data type: `Stdlib::Absolutepath`
Path for postgresql.conf
Default value: `$postgresql::server::postgresql_conf_path`
##### <a name="-postgresql--server--config_entry--comment"></a>`comment`
Data type: `Optional[String[1]]`
Defines the comment for the setting. The # is added by default.
Default value: `undef`
##### <a name="-postgresql--server--config_entry--instance_name"></a>`instance_name`
Data type: `String[1]`
The name of the instance.
Default value: `'main'`
### <a name="postgresql--server--database"></a>`postgresql::server::database`
Define for creating a database.
#### Parameters
The following parameters are available in the `postgresql::server::database` defined type:
* [`comment`](#-postgresql--server--database--comment)
* [`dbname`](#-postgresql--server--database--dbname)
* [`owner`](#-postgresql--server--database--owner)
* [`tablespace`](#-postgresql--server--database--tablespace)
* [`template`](#-postgresql--server--database--template)
* [`encoding`](#-postgresql--server--database--encoding)
* [`locale`](#-postgresql--server--database--locale)
* [`istemplate`](#-postgresql--server--database--istemplate)
* [`instance`](#-postgresql--server--database--instance)
* [`connect_settings`](#-postgresql--server--database--connect_settings)
* [`psql_path`](#-postgresql--server--database--psql_path)
* [`default_db`](#-postgresql--server--database--default_db)
* [`user`](#-postgresql--server--database--user)
* [`group`](#-postgresql--server--database--group)
* [`port`](#-postgresql--server--database--port)
##### <a name="-postgresql--server--database--comment"></a>`comment`
Data type: `Optional[String[1]]`
Sets a comment on the database.
Default value: `undef`
##### <a name="-postgresql--server--database--dbname"></a>`dbname`
Data type: `String[1]`
Sets the name of the database.
Default value: `$title`
##### <a name="-postgresql--server--database--owner"></a>`owner`
Data type: `Optional[String[1]]`
Sets name of the database owner.
Default value: `undef`
##### <a name="-postgresql--server--database--tablespace"></a>`tablespace`
Data type: `Optional[String[1]]`
Sets tablespace for where to create this database.
Default value: `undef`
##### <a name="-postgresql--server--database--template"></a>`template`
Data type: `String[1]`
Specifies the name of the template database from which to build this database. Default value: 'template0'.
Default value: `'template0'`
##### <a name="-postgresql--server--database--encoding"></a>`encoding`
Data type: `Optional[String[1]]`
Overrides the character set during creation of the database.
Default value: `$postgresql::server::encoding`
##### <a name="-postgresql--server--database--locale"></a>`locale`
Data type: `Optional[String[1]]`
Overrides the locale during creation of the database.
Default value: `$postgresql::server::locale`
##### <a name="-postgresql--server--database--istemplate"></a>`istemplate`
Data type: `Boolean`
Defines the database as a template if set to true.
Default value: `false`
##### <a name="-postgresql--server--database--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
##### <a name="-postgresql--server--database--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `$postgresql::server::default_connect_settings`
##### <a name="-postgresql--server--database--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to the psql command.
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--database--default_db"></a>`default_db`
Data type: `String[1]`
Specifies the name of the default database to connect with. On most systems this is 'postgres'.
Default value: `$postgresql::server::default_database`
##### <a name="-postgresql--server--database--user"></a>`user`
Data type: `String[1]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--database--group"></a>`group`
Data type: `String[1]`
Overrides the default postgres user group to be used for related files in the file system.
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--database--port"></a>`port`
Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Default value: `$postgresql::server::port`
### <a name="postgresql--server--database_grant"></a>`postgresql::server::database_grant`
Manage a database grant.
#### Parameters
The following parameters are available in the `postgresql::server::database_grant` defined type:
* [`privilege`](#-postgresql--server--database_grant--privilege)
* [`db`](#-postgresql--server--database_grant--db)
* [`role`](#-postgresql--server--database_grant--role)
* [`ensure`](#-postgresql--server--database_grant--ensure)
* [`psql_db`](#-postgresql--server--database_grant--psql_db)
* [`psql_user`](#-postgresql--server--database_grant--psql_user)
* [`psql_group`](#-postgresql--server--database_grant--psql_group)
* [`connect_settings`](#-postgresql--server--database_grant--connect_settings)
* [`port`](#-postgresql--server--database_grant--port)
* [`instance`](#-postgresql--server--database_grant--instance)
##### <a name="-postgresql--server--database_grant--privilege"></a>`privilege`
Data type: `Enum['ALL', 'CREATE', 'CONNECT', 'TEMPORARY', 'TEMP', 'all', 'create', 'connect', 'temporary', 'temp']`
Specifies comma-separated list of privileges to grant. Valid options: 'ALL', 'CREATE', 'CONNECT', 'TEMPORARY', 'TEMP'.
##### <a name="-postgresql--server--database_grant--db"></a>`db`
Data type: `String[1]`
Specifies the database to which you are granting access.
##### <a name="-postgresql--server--database_grant--role"></a>`role`
Data type: `String[1]`
Specifies the role or user whom you are granting access to.
##### <a name="-postgresql--server--database_grant--ensure"></a>`ensure`
Data type: `Optional[Enum['present', 'absent']]`
Specifies whether to grant or revoke the privilege. Revoke or 'absent' works only in PostgreSQL version 9.1.24 or later.
Default value: `undef`
##### <a name="-postgresql--server--database_grant--psql_db"></a>`psql_db`
Data type: `Optional[String[1]]`
Defines the database to execute the grant against. This should not ordinarily be changed from the default
Default value: `undef`
##### <a name="-postgresql--server--database_grant--psql_user"></a>`psql_user`
Data type: `String[1]`
Specifies the OS user for running psql. Default value: The default user for the module, usually 'postgres'.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--database_grant--psql_group"></a>`psql_group`
Data type: `String[1]`
Overrides the default postgres user group to be used for related files in the file system.
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--database_grant--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `$postgresql::server::default_connect_settings`
##### <a name="-postgresql--server--database_grant--port"></a>`port`
Data type: `Stdlib::Port`
Port to use when connecting.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--database_grant--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
### <a name="postgresql--server--db"></a>`postgresql::server::db`
Define for conveniently creating a role, database and assigning the correct permissions.
#### Parameters
The following parameters are available in the `postgresql::server::db` defined type:
* [`user`](#-postgresql--server--db--user)
* [`password`](#-postgresql--server--db--password)
* [`comment`](#-postgresql--server--db--comment)
* [`dbname`](#-postgresql--server--db--dbname)
* [`encoding`](#-postgresql--server--db--encoding)
* [`locale`](#-postgresql--server--db--locale)
* [`grant`](#-postgresql--server--db--grant)
* [`tablespace`](#-postgresql--server--db--tablespace)
* [`template`](#-postgresql--server--db--template)
* [`istemplate`](#-postgresql--server--db--istemplate)
* [`owner`](#-postgresql--server--db--owner)
* [`port`](#-postgresql--server--db--port)
* [`psql_user`](#-postgresql--server--db--psql_user)
* [`psql_group`](#-postgresql--server--db--psql_group)
* [`instance`](#-postgresql--server--db--instance)
##### <a name="-postgresql--server--db--user"></a>`user`
Data type: `String[1]`
User to assign access to the database upon creation (will be created if not defined elsewhere). Mandatory.
##### <a name="-postgresql--server--db--password"></a>`password`
Data type: `Optional[Variant[String, Sensitive[String]]]`
Sets the password for the created user (if a user is created).
Default value: `undef`
##### <a name="-postgresql--server--db--comment"></a>`comment`
Data type: `Optional[String[1]]`
Defines a comment to be stored about the database using the PostgreSQL COMMENT command.
Default value: `undef`
##### <a name="-postgresql--server--db--dbname"></a>`dbname`
Data type: `String[1]`
Sets the name of the database to be created.
Default value: `$title`
##### <a name="-postgresql--server--db--encoding"></a>`encoding`
Data type: `Optional[String[1]]`
Overrides the character set during creation of the database.
Default value: `$postgresql::server::encoding`
##### <a name="-postgresql--server--db--locale"></a>`locale`
Data type: `Optional[String[1]]`
Overrides the locale during creation of the database.
Default value: `$postgresql::server::locale`
##### <a name="-postgresql--server--db--grant"></a>`grant`
Data type: `Variant[String[1], Array[String[1]]]`
Specifies the permissions to grant during creation. Default value: 'ALL'.
Default value: `'ALL'`
##### <a name="-postgresql--server--db--tablespace"></a>`tablespace`
Data type: `Optional[String[1]]`
Defines the name of the tablespace to allocate the created database to.
Default value: `undef`
##### <a name="-postgresql--server--db--template"></a>`template`
Data type: `String[1]`
Specifies the name of the template database from which to build this database. Defaults value: template0.
Default value: `'template0'`
##### <a name="-postgresql--server--db--istemplate"></a>`istemplate`
Data type: `Boolean`
Specifies that the database is a template, if set to true.
Default value: `false`
##### <a name="-postgresql--server--db--owner"></a>`owner`
Data type: `Optional[String[1]]`
Sets a user as the owner of the database.
Default value: `undef`
##### <a name="-postgresql--server--db--port"></a>`port`
Data type: `Optional[Stdlib::Port]`
Specifies the port where the PostgreSQL server is listening on.
Default value: `undef`
##### <a name="-postgresql--server--db--psql_user"></a>`psql_user`
Data type: `String[1]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--db--psql_group"></a>`psql_group`
Data type: `String[1]`
Overrides the default PostgreSQL user group to be used for related files in the file system.
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--db--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
### <a name="postgresql--server--default_privileges"></a>`postgresql::server::default_privileges`
Manage a database defaults privileges. Only works with PostgreSQL version 9.6 and above.
#### Parameters
The following parameters are available in the `postgresql::server::default_privileges` defined type:
* [`target_role`](#-postgresql--server--default_privileges--target_role)
* [`ensure`](#-postgresql--server--default_privileges--ensure)
* [`role`](#-postgresql--server--default_privileges--role)
* [`db`](#-postgresql--server--default_privileges--db)
* [`object_type`](#-postgresql--server--default_privileges--object_type)
* [`privilege`](#-postgresql--server--default_privileges--privilege)
* [`schema`](#-postgresql--server--default_privileges--schema)
* [`psql_db`](#-postgresql--server--default_privileges--psql_db)
* [`psql_user`](#-postgresql--server--default_privileges--psql_user)
* [`psql_path`](#-postgresql--server--default_privileges--psql_path)
* [`port`](#-postgresql--server--default_privileges--port)
* [`connect_settings`](#-postgresql--server--default_privileges--connect_settings)
* [`instance`](#-postgresql--server--default_privileges--instance)
* [`group`](#-postgresql--server--default_privileges--group)
##### <a name="-postgresql--server--default_privileges--target_role"></a>`target_role`
Data type: `Optional[String]`
Target role whose created objects will receive the default privileges. Defaults to the current user.
Default value: `undef`
##### <a name="-postgresql--server--default_privileges--ensure"></a>`ensure`
Data type: `Enum['present', 'absent']`
Specifies whether to grant or revoke the privilege.
Default value: `'present'`
##### <a name="-postgresql--server--default_privileges--role"></a>`role`
Data type: `String`
Specifies the role or user whom you are granting access to.
##### <a name="-postgresql--server--default_privileges--db"></a>`db`
Data type: `String`
Specifies the database to which you are granting access.
##### <a name="-postgresql--server--default_privileges--object_type"></a>`object_type`
Data type:
```puppet
Pattern[
/(?i:^FUNCTIONS$)/,
/(?i:^ROUTINES$)/,
/(?i:^SEQUENCES$)/,
/(?i:^TABLES$)/,
/(?i:^TYPES$)/,
/(?i:^SCHEMAS$)/
]
```
Specify target object type: 'FUNCTIONS', 'ROUTINES', 'SEQUENCES', 'TABLES', 'TYPES'.
##### <a name="-postgresql--server--default_privileges--privilege"></a>`privilege`
Data type: `String`
Specifies comma-separated list of privileges to grant. Valid options: depends on object type.
##### <a name="-postgresql--server--default_privileges--schema"></a>`schema`
Data type: `String`
Target schema. Defaults to 'public'. Can be set to '' to apply to all schemas.
Default value: `'public'`
##### <a name="-postgresql--server--default_privileges--psql_db"></a>`psql_db`
Data type: `String`
Defines the database to execute the grant against. This should not ordinarily be changed from the default.
Default value: `$postgresql::server::default_database`
##### <a name="-postgresql--server--default_privileges--psql_user"></a>`psql_user`
Data type: `String`
Specifies the OS user for running psql. Default value: The default user for the module, usually 'postgres'.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--default_privileges--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Specifies the OS user for running psql. Default value: The default user for the module, usually 'postgres'.
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--default_privileges--port"></a>`port`
Data type: `Stdlib::Port`
Specifies the port to access the server. Default value: The default user for the module, usually '5432'.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--default_privileges--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `$postgresql::server::default_connect_settings`
##### <a name="-postgresql--server--default_privileges--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
##### <a name="-postgresql--server--default_privileges--group"></a>`group`
Data type: `String`
Specifies the user group to which the privileges will be granted.
Default value: `$postgresql::server::group`
### <a name="postgresql--server--extension"></a>`postgresql::server::extension`
Activate an extension on a postgresql database.
#### Parameters
The following parameters are available in the `postgresql::server::extension` defined type:
* [`database`](#-postgresql--server--extension--database)
* [`extension`](#-postgresql--server--extension--extension)
* [`schema`](#-postgresql--server--extension--schema)
* [`version`](#-postgresql--server--extension--version)
* [`ensure`](#-postgresql--server--extension--ensure)
* [`package_name`](#-postgresql--server--extension--package_name)
* [`package_ensure`](#-postgresql--server--extension--package_ensure)
* [`port`](#-postgresql--server--extension--port)
* [`connect_settings`](#-postgresql--server--extension--connect_settings)
* [`database_resource_name`](#-postgresql--server--extension--database_resource_name)
* [`instance`](#-postgresql--server--extension--instance)
* [`psql_path`](#-postgresql--server--extension--psql_path)
* [`user`](#-postgresql--server--extension--user)
* [`group`](#-postgresql--server--extension--group)
##### <a name="-postgresql--server--extension--database"></a>`database`
Data type: `String[1]`
Specifies the database on which to activate the extension.
##### <a name="-postgresql--server--extension--extension"></a>`extension`
Data type: `String[1]`
Specifies the extension to activate. If left blank, uses the name of the resource.
Default value: `$name`
##### <a name="-postgresql--server--extension--schema"></a>`schema`
Data type: `Optional[String[1]]`
Specifies the schema on which to activate the extension.
Default value: `undef`
##### <a name="-postgresql--server--extension--version"></a>`version`
Data type: `Optional[String[1]]`
Specifies the version of the extension which the database uses. When an extension package is updated, this does not automatically
change the effective version in each database.
This needs be updated using the PostgreSQL-specific SQL ALTER EXTENSION...
version may be set to latest, in which case the SQL ALTER EXTENSION "extension" UPDATE is applied to this database (only).
version may be set to a specific version, in which case the extension is updated using ALTER EXTENSION "extension" UPDATE TO 'version'
eg. If extension is set to postgis and version is set to 2.3.3, this will apply the SQL ALTER EXTENSION "postgis" UPDATE TO '2.3.3' to
this database only.
version may be omitted, in which case no ALTER EXTENSION... SQL is applied, and the version will be left unchanged.
Default value: `undef`
##### <a name="-postgresql--server--extension--ensure"></a>`ensure`
Data type: `Enum['present', 'absent']`
Specifies whether to activate or deactivate the extension. Valid options: 'present' or 'absent'.
Default value: `'present'`
##### <a name="-postgresql--server--extension--package_name"></a>`package_name`
Data type: `Optional[String[1]]`
Specifies a package to install prior to activating the extension.
Default value: `undef`
##### <a name="-postgresql--server--extension--package_ensure"></a>`package_ensure`
Data type: `Optional[Variant[Enum['present', 'absent', 'purged', 'disabled', 'installed', 'latest'], String[1]]]`
Overrides default package deletion behavior. By default, the package specified with package_name is installed when the extension is
activated and removed when the extension is deactivated. To override this behavior, set the ensure value for the package.
Default value: `undef`
##### <a name="-postgresql--server--extension--port"></a>`port`
Data type: `Stdlib::Port`
Port to use when connecting.
Default value: `postgresql::default('port')`
##### <a name="-postgresql--server--extension--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `postgresql::default('default_connect_settings')`
##### <a name="-postgresql--server--extension--database_resource_name"></a>`database_resource_name`
Data type: `String[1]`
Specifies the resource name of the DB being managed. Defaults to the parameter $database, if left blank.
Default value: `$database`
##### <a name="-postgresql--server--extension--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
##### <a name="-postgresql--server--extension--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to the psql command.
Default value: `postgresql::default('psql_path')`
##### <a name="-postgresql--server--extension--user"></a>`user`
Data type: `String[1]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `postgresql::default('user')`
##### <a name="-postgresql--server--extension--group"></a>`group`
Data type: `String[1]`
Overrides the default postgres user group to be used for related files in the file system.
Default value: `postgresql::default('group')`
### <a name="postgresql--server--grant"></a>`postgresql::server::grant`
Define for granting permissions to roles.
#### Parameters
The following parameters are available in the `postgresql::server::grant` defined type:
* [`role`](#-postgresql--server--grant--role)
* [`db`](#-postgresql--server--grant--db)
* [`privilege`](#-postgresql--server--grant--privilege)
* [`object_type`](#-postgresql--server--grant--object_type)
* [`object_name`](#-postgresql--server--grant--object_name)
* [`object_arguments`](#-postgresql--server--grant--object_arguments)
* [`psql_db`](#-postgresql--server--grant--psql_db)
* [`psql_user`](#-postgresql--server--grant--psql_user)
* [`port`](#-postgresql--server--grant--port)
* [`onlyif_exists`](#-postgresql--server--grant--onlyif_exists)
* [`connect_settings`](#-postgresql--server--grant--connect_settings)
* [`ensure`](#-postgresql--server--grant--ensure)
* [`group`](#-postgresql--server--grant--group)
* [`psql_path`](#-postgresql--server--grant--psql_path)
* [`instance`](#-postgresql--server--grant--instance)
##### <a name="-postgresql--server--grant--role"></a>`role`
Data type: `String`
Specifies the role or user whom you are granting access to.
##### <a name="-postgresql--server--grant--db"></a>`db`
Data type: `String`
Specifies the database to which you are granting access.
##### <a name="-postgresql--server--grant--privilege"></a>`privilege`
Data type: `String`
Specifies the privilege to grant. Valid options: 'ALL', 'ALL PRIVILEGES' or 'object_type' dependent string.
Default value: `''`
##### <a name="-postgresql--server--grant--object_type"></a>`object_type`
Data type:
```puppet
Pattern[#/(?i:^COLUMN$)/,
/(?i:^ALL SEQUENCES IN SCHEMA$)/,
/(?i:^ALL TABLES IN SCHEMA$)/,
/(?i:^DATABASE$)/,
#/(?i:^FOREIGN DATA WRAPPER$)/,
#/(?i:^FOREIGN SERVER$)/,
/(?i:^FUNCTION$)/,
/(?i:^LANGUAGE$)/,
#/(?i:^PROCEDURAL LANGUAGE$)/,
/(?i:^TABLE$)/,
#/(?i:^TABLESPACE$)/,
/(?i:^SCHEMA$)/,
/(?i:^SEQUENCE$)/
#/(?i:^VIEW$)/
]
```
Specifies the type of object to which you are granting privileges.
Valid options: 'DATABASE', 'SCHEMA', 'SEQUENCE', 'ALL SEQUENCES IN SCHEMA', 'TABLE' or 'ALL TABLES IN SCHEMA'.
Default value: `'database'`
##### <a name="-postgresql--server--grant--object_name"></a>`object_name`
Data type: `Optional[Variant[Array[String,2,2],String[1]]]`
Specifies name of object_type to which to grant access, can be either a string or a two element array.
String: 'object_name' Array: ['schema_name', 'object_name']
Default value: `undef`
##### <a name="-postgresql--server--grant--object_arguments"></a>`object_arguments`
Data type: `Array[String[1],0]`
Specifies any arguments to be passed alongisde the access grant.
Default value: `[]`
##### <a name="-postgresql--server--grant--psql_db"></a>`psql_db`
Data type: `String`
Specifies the database to execute the grant against. This should not ordinarily be changed from the default
Default value: `$postgresql::server::default_database`
##### <a name="-postgresql--server--grant--psql_user"></a>`psql_user`
Data type: `String`
Sets the OS user to run psql.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--grant--port"></a>`port`
Data type: `Stdlib::Port`
Port to use when connecting.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--grant--onlyif_exists"></a>`onlyif_exists`
Data type: `Boolean`
Create grant only if doesn't exist
Default value: `false`
##### <a name="-postgresql--server--grant--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `$postgresql::server::default_connect_settings`
##### <a name="-postgresql--server--grant--ensure"></a>`ensure`
Data type: `Enum['present', 'absent']`
Specifies whether to grant or revoke the privilege. Default is to grant the privilege. Valid values: 'present', 'absent'.
Default value: `'present'`
##### <a name="-postgresql--server--grant--group"></a>`group`
Data type: `String`
Sets the OS group to run psql
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--grant--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Sets the path to psql command
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--grant--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
### <a name="postgresql--server--grant_role"></a>`postgresql::server::grant_role`
Define for granting membership to a role.
#### Parameters
The following parameters are available in the `postgresql::server::grant_role` defined type:
* [`group`](#-postgresql--server--grant_role--group)
* [`role`](#-postgresql--server--grant_role--role)
* [`ensure`](#-postgresql--server--grant_role--ensure)
* [`psql_db`](#-postgresql--server--grant_role--psql_db)
* [`psql_user`](#-postgresql--server--grant_role--psql_user)
* [`port`](#-postgresql--server--grant_role--port)
* [`connect_settings`](#-postgresql--server--grant_role--connect_settings)
* [`instance`](#-postgresql--server--grant_role--instance)
##### <a name="-postgresql--server--grant_role--group"></a>`group`
Data type: `String[1]`
Specifies the group role to which you are assigning a role.
##### <a name="-postgresql--server--grant_role--role"></a>`role`
Data type: `String[1]`
Specifies the role you want to assign to a group. If left blank, uses the name of the resource.
Default value: `$name`
##### <a name="-postgresql--server--grant_role--ensure"></a>`ensure`
Data type: `Enum['present', 'absent']`
Specifies whether to grant or revoke the membership. Valid options: 'present' or 'absent'.
Default value: `'present'`
##### <a name="-postgresql--server--grant_role--psql_db"></a>`psql_db`
Data type: `String[1]`
Specifies the database to execute the grant against. This should not ordinarily be changed from the default
Default value: `$postgresql::server::default_database`
##### <a name="-postgresql--server--grant_role--psql_user"></a>`psql_user`
Data type: `String[1]`
Sets the OS user to run psql.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--grant_role--port"></a>`port`
Data type: `Stdlib::Port`
Port to use when connecting.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--grant_role--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `$postgresql::server::default_connect_settings`
##### <a name="-postgresql--server--grant_role--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
### <a name="postgresql--server--instance--config"></a>`postgresql::server::instance::config`
Manages the config for a postgresql::server instance
#### Parameters
The following parameters are available in the `postgresql::server::instance::config` defined type:
* [`ip_mask_deny_postgres_user`](#-postgresql--server--instance--config--ip_mask_deny_postgres_user)
* [`ip_mask_allow_all_users`](#-postgresql--server--instance--config--ip_mask_allow_all_users)
* [`listen_addresses`](#-postgresql--server--instance--config--listen_addresses)
* [`port`](#-postgresql--server--instance--config--port)
* [`ipv4acls`](#-postgresql--server--instance--config--ipv4acls)
* [`ipv6acls`](#-postgresql--server--instance--config--ipv6acls)
* [`pg_hba_conf_path`](#-postgresql--server--instance--config--pg_hba_conf_path)
* [`pg_ident_conf_path`](#-postgresql--server--instance--config--pg_ident_conf_path)
* [`postgresql_conf_path`](#-postgresql--server--instance--config--postgresql_conf_path)
* [`postgresql_conf_mode`](#-postgresql--server--instance--config--postgresql_conf_mode)
* [`recovery_conf_path`](#-postgresql--server--instance--config--recovery_conf_path)
* [`pg_hba_conf_defaults`](#-postgresql--server--instance--config--pg_hba_conf_defaults)
* [`user`](#-postgresql--server--instance--config--user)
* [`group`](#-postgresql--server--instance--config--group)
* [`version`](#-postgresql--server--instance--config--version)
* [`manage_pg_hba_conf`](#-postgresql--server--instance--config--manage_pg_hba_conf)
* [`manage_pg_ident_conf`](#-postgresql--server--instance--config--manage_pg_ident_conf)
* [`manage_recovery_conf`](#-postgresql--server--instance--config--manage_recovery_conf)
* [`manage_postgresql_conf_perms`](#-postgresql--server--instance--config--manage_postgresql_conf_perms)
* [`datadir`](#-postgresql--server--instance--config--datadir)
* [`logdir`](#-postgresql--server--instance--config--logdir)
* [`service_name`](#-postgresql--server--instance--config--service_name)
* [`service_enable`](#-postgresql--server--instance--config--service_enable)
* [`log_line_prefix`](#-postgresql--server--instance--config--log_line_prefix)
* [`timezone`](#-postgresql--server--instance--config--timezone)
* [`password_encryption`](#-postgresql--server--instance--config--password_encryption)
* [`pg_hba_auth_password_encryption`](#-postgresql--server--instance--config--pg_hba_auth_password_encryption)
* [`extra_systemd_config`](#-postgresql--server--instance--config--extra_systemd_config)
* [`manage_selinux`](#-postgresql--server--instance--config--manage_selinux)
##### <a name="-postgresql--server--instance--config--ip_mask_deny_postgres_user"></a>`ip_mask_deny_postgres_user`
Data type: `String[1]`
Specifies the IP mask from which remote connections should be denied for the postgres superuser.
Default value: '0.0.0.0/0', which denies any remote connection.
Default value: `$postgresql::server::ip_mask_deny_postgres_user`
##### <a name="-postgresql--server--instance--config--ip_mask_allow_all_users"></a>`ip_mask_allow_all_users`
Data type: `String[1]`
Overrides PostgreSQL defaults for remote connections. By default, PostgreSQL does not allow database user accounts to connect via TCP
from remote machines. If you'd like to allow this, you can override this setting.
Set to '0.0.0.0/0' to allow database users to connect from any remote machine, or '192.168.0.0/1' to allow connections from any machine
on your local '192.168' subnet.
Default value: '127.0.0.1/32'.
Default value: `$postgresql::server::ip_mask_allow_all_users`
##### <a name="-postgresql--server--instance--config--listen_addresses"></a>`listen_addresses`
Data type: `Optional[Variant[String[1], Array[String[1]]]]`
Address list on which the PostgreSQL service will listen
Default value: `$postgresql::server::listen_addresses`
##### <a name="-postgresql--server--instance--config--port"></a>`port`
Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems,
changing the port causes the server to come to a full stop before being able to make the change.
Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--instance--config--ipv4acls"></a>`ipv4acls`
Data type: `Array[String[1]]`
Lists strings for access control for connection method, users, databases, IPv4 addresses.
Default value: `$postgresql::server::ipv4acls`
##### <a name="-postgresql--server--instance--config--ipv6acls"></a>`ipv6acls`
Data type: `Array[String[1]]`
Lists strings for access control for connection method, users, databases, IPv6 addresses.
Default value: `$postgresql::server::ipv6acls`
##### <a name="-postgresql--server--instance--config--pg_hba_conf_path"></a>`pg_hba_conf_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to your pg_hba.conf file.
Default value: `$postgresql::server::pg_hba_conf_path`
##### <a name="-postgresql--server--instance--config--pg_ident_conf_path"></a>`pg_ident_conf_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to your pg_ident.conf file.
Default value: `$postgresql::server::pg_ident_conf_path`
##### <a name="-postgresql--server--instance--config--postgresql_conf_path"></a>`postgresql_conf_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to your postgresql.conf file.
Default value: `$postgresql::server::postgresql_conf_path`
##### <a name="-postgresql--server--instance--config--postgresql_conf_mode"></a>`postgresql_conf_mode`
Data type: `Optional[Stdlib::Filemode]`
Sets the mode of your postgresql.conf file. Only relevant if manage_postgresql_conf_perms is true.
Default value: `$postgresql::server::postgresql_conf_mode`
##### <a name="-postgresql--server--instance--config--recovery_conf_path"></a>`recovery_conf_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to your recovery.conf file.
Default value: `$postgresql::server::recovery_conf_path`
##### <a name="-postgresql--server--instance--config--pg_hba_conf_defaults"></a>`pg_hba_conf_defaults`
Data type: `Boolean`
If false, disables the defaults supplied with the module for pg_hba.conf. This is useful if you disagree with the defaults and wish to
override them yourself. Be sure that your changes of course align with the rest of the module, as some access is required to perform
basic psql operations for example.
Default value: `$postgresql::server::pg_hba_conf_defaults`
##### <a name="-postgresql--server--instance--config--user"></a>`user`
Data type: `String[1]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--instance--config--group"></a>`group`
Data type: `String[1]`
Overrides the default postgres user group to be used for related files in the file system.
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--instance--config--version"></a>`version`
Data type: `Optional[String[1]]`
Sets PostgreSQL version
Default value: `$postgresql::server::_version`
##### <a name="-postgresql--server--instance--config--manage_pg_hba_conf"></a>`manage_pg_hba_conf`
Data type: `Boolean`
Boolean. Whether to manage the pg_hba.conf.
Default value: `$postgresql::server::manage_pg_hba_conf`
##### <a name="-postgresql--server--instance--config--manage_pg_ident_conf"></a>`manage_pg_ident_conf`
Data type: `Boolean`
Boolean. Overwrites the pg_ident.conf file.
Default value: `$postgresql::server::manage_pg_ident_conf`
##### <a name="-postgresql--server--instance--config--manage_recovery_conf"></a>`manage_recovery_conf`
Data type: `Boolean`
Boolean. Specifies whether or not manage the recovery.conf.
Default value: `$postgresql::server::manage_recovery_conf`
##### <a name="-postgresql--server--instance--config--manage_postgresql_conf_perms"></a>`manage_postgresql_conf_perms`
Data type: `Boolean`
Whether to manage the postgresql conf file permissions. This means owner,
group and mode. Contents are not managed but should be managed through
postgresql::server::config_entry.
Default value: `$postgresql::server::manage_postgresql_conf_perms`
##### <a name="-postgresql--server--instance--config--datadir"></a>`datadir`
Data type: `Stdlib::Absolutepath`
PostgreSQL data directory
Default value: `$postgresql::server::datadir`
##### <a name="-postgresql--server--instance--config--logdir"></a>`logdir`
Data type: `Optional[Stdlib::Absolutepath]`
PostgreSQL log directory
Default value: `$postgresql::server::logdir`
##### <a name="-postgresql--server--instance--config--service_name"></a>`service_name`
Data type: `String[1]`
Overrides the default PostgreSQL service name.
Default value: `$postgresql::server::service_name`
##### <a name="-postgresql--server--instance--config--service_enable"></a>`service_enable`
Data type: `Boolean`
Enable the PostgreSQL service
Default value: `$postgresql::server::service_enable`
##### <a name="-postgresql--server--instance--config--log_line_prefix"></a>`log_line_prefix`
Data type: `Optional[String[1]]`
PostgreSQL log line prefix
Default value: `$postgresql::server::log_line_prefix`
##### <a name="-postgresql--server--instance--config--timezone"></a>`timezone`
Data type: `Optional[String[1]]`
Set timezone for the PostgreSQL instance
Default value: `$postgresql::server::timezone`
##### <a name="-postgresql--server--instance--config--password_encryption"></a>`password_encryption`
Data type: `Postgresql::Pg_password_encryption`
Specify the type of encryption set for the password.
Default value: `$postgresql::server::password_encryption`
##### <a name="-postgresql--server--instance--config--pg_hba_auth_password_encryption"></a>`pg_hba_auth_password_encryption`
Data type: `Optional[Postgresql::Pg_password_encryption]`
Specify the type of encryption set for the password in pg_hba_conf,
this value is usefull if you want to start enforcing scram-sha-256, but give users transition time.
Default value: `$postgresql::server::pg_hba_auth_password_encryption`
##### <a name="-postgresql--server--instance--config--extra_systemd_config"></a>`extra_systemd_config`
Data type: `Optional[String]`
Adds extra config to systemd config file, can for instance be used to add extra openfiles. This can be a multi line string
Default value: `$postgresql::server::extra_systemd_config`
##### <a name="-postgresql--server--instance--config--manage_selinux"></a>`manage_selinux`
Data type: `Boolean`
Specifies whether or not manage the conf file for selinux.
Default value: `$postgresql::server::manage_selinux`
### <a name="postgresql--server--instance--initdb"></a>`postgresql::server::instance::initdb`
Manages initdb feature for a postgresql::server instance
#### Parameters
The following parameters are available in the `postgresql::server::instance::initdb` defined type:
* [`auth_host`](#-postgresql--server--instance--initdb--auth_host)
* [`auth_local`](#-postgresql--server--instance--initdb--auth_local)
* [`data_checksums`](#-postgresql--server--instance--initdb--data_checksums)
* [`datadir`](#-postgresql--server--instance--initdb--datadir)
* [`encoding`](#-postgresql--server--instance--initdb--encoding)
* [`group`](#-postgresql--server--instance--initdb--group)
* [`initdb_path`](#-postgresql--server--instance--initdb--initdb_path)
* [`lc_messages`](#-postgresql--server--instance--initdb--lc_messages)
* [`locale`](#-postgresql--server--instance--initdb--locale)
* [`logdir`](#-postgresql--server--instance--initdb--logdir)
* [`manage_datadir`](#-postgresql--server--instance--initdb--manage_datadir)
* [`manage_logdir`](#-postgresql--server--instance--initdb--manage_logdir)
* [`manage_xlogdir`](#-postgresql--server--instance--initdb--manage_xlogdir)
* [`module_workdir`](#-postgresql--server--instance--initdb--module_workdir)
* [`needs_initdb`](#-postgresql--server--instance--initdb--needs_initdb)
* [`user`](#-postgresql--server--instance--initdb--user)
* [`username`](#-postgresql--server--instance--initdb--username)
* [`xlogdir`](#-postgresql--server--instance--initdb--xlogdir)
* [`port`](#-postgresql--server--instance--initdb--port)
* [`psql_path`](#-postgresql--server--instance--initdb--psql_path)
##### <a name="-postgresql--server--instance--initdb--auth_host"></a>`auth_host`
Data type: `Optional[String[1]]`
auth method used by default for host authorization
Default value: `$postgresql::server::auth_host`
##### <a name="-postgresql--server--instance--initdb--auth_local"></a>`auth_local`
Data type: `Optional[String[1]]`
auth method used by default for local authorization
Default value: `$postgresql::server::auth_local`
##### <a name="-postgresql--server--instance--initdb--data_checksums"></a>`data_checksums`
Data type: `Optional[Boolean]`
Boolean. Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent.
Default value: `$postgresql::server::data_checksums`
##### <a name="-postgresql--server--instance--initdb--datadir"></a>`datadir`
Data type: `Stdlib::Absolutepath`
PostgreSQL data directory
Default value: `$postgresql::server::datadir`
##### <a name="-postgresql--server--instance--initdb--encoding"></a>`encoding`
Data type: `Optional[String[1]]`
Sets the default encoding for all databases created with this module.
On certain operating systems this is also used during the template1 initialization,
so it becomes a default outside of the module as well.
Default value: `$postgresql::server::encoding`
##### <a name="-postgresql--server--instance--initdb--group"></a>`group`
Data type: `String[1]`
Overrides the default postgres user group to be used for related files in the file system.
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--instance--initdb--initdb_path"></a>`initdb_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to the initdb command.
Default value: `$postgresql::server::initdb_path`
##### <a name="-postgresql--server--instance--initdb--lc_messages"></a>`lc_messages`
Data type: `Optional[String[1]]`
locale used for logging and system messages
Default value: `$postgresql::server::lc_messages`
##### <a name="-postgresql--server--instance--initdb--locale"></a>`locale`
Data type: `Optional[String[1]]`
Sets the default database locale for all databases created with this module.
On certain operating systems this is used during the template1 initialization as well, so it becomes a default outside of the module.
Warning: This option is used during initialization by initdb, and cannot be changed later.
If set, checksums are calculated for all objects, in all databases.
Default value: `$postgresql::server::locale`
##### <a name="-postgresql--server--instance--initdb--logdir"></a>`logdir`
Data type: `Optional[Stdlib::Absolutepath]`
PostgreSQL log directory
Default value: `$postgresql::server::logdir`
##### <a name="-postgresql--server--instance--initdb--manage_datadir"></a>`manage_datadir`
Data type: `Boolean`
Set to false if you have file{ $datadir: } already defined
Default value: `$postgresql::server::manage_datadir`
##### <a name="-postgresql--server--instance--initdb--manage_logdir"></a>`manage_logdir`
Data type: `Boolean`
Set to false if you have file{ $logdir: } already defined
Default value: `$postgresql::server::manage_logdir`
##### <a name="-postgresql--server--instance--initdb--manage_xlogdir"></a>`manage_xlogdir`
Data type: `Boolean`
Set to false if you have file{ $xlogdir: } already defined
Default value: `$postgresql::server::manage_xlogdir`
##### <a name="-postgresql--server--instance--initdb--module_workdir"></a>`module_workdir`
Data type: `Stdlib::Absolutepath`
Working directory for the PostgreSQL module
Default value: `$postgresql::server::module_workdir`
##### <a name="-postgresql--server--instance--initdb--needs_initdb"></a>`needs_initdb`
Data type: `Boolean`
Explicitly calls the initdb operation after server package is installed
and before the PostgreSQL service is started.
Default value: `$postgresql::server::needs_initdb`
##### <a name="-postgresql--server--instance--initdb--user"></a>`user`
Data type: `String[1]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--instance--initdb--username"></a>`username`
Data type: `Optional[String[1]]`
username of user running the postgres instance
Default value: `$postgresql::server::username`
##### <a name="-postgresql--server--instance--initdb--xlogdir"></a>`xlogdir`
Data type: `Optional[Stdlib::Absolutepath]`
PostgreSQL xlog/WAL directory
Default value: `$postgresql::server::xlogdir`
##### <a name="-postgresql--server--instance--initdb--port"></a>`port`
Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems,
changing the port causes the server to come to a full stop before being able to make the change.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--instance--initdb--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to the psql command.
Default value: `$postgresql::server::psql_path`
### <a name="postgresql--server--instance--late_initdb"></a>`postgresql::server::instance::late_initdb`
Manage the default encoding when database initialization is managed by the package
#### Parameters
The following parameters are available in the `postgresql::server::instance::late_initdb` defined type:
* [`encoding`](#-postgresql--server--instance--late_initdb--encoding)
* [`user`](#-postgresql--server--instance--late_initdb--user)
* [`group`](#-postgresql--server--instance--late_initdb--group)
* [`psql_path`](#-postgresql--server--instance--late_initdb--psql_path)
* [`port`](#-postgresql--server--instance--late_initdb--port)
* [`module_workdir`](#-postgresql--server--instance--late_initdb--module_workdir)
##### <a name="-postgresql--server--instance--late_initdb--encoding"></a>`encoding`
Data type: `Optional[String[1]]`
Sets the default encoding for all databases created with this module. On certain operating systems this is also used during the
template1 initialization, so it becomes a default outside of the module as well.
Default value: `$postgresql::server::encoding`
##### <a name="-postgresql--server--instance--late_initdb--user"></a>`user`
Data type: `String[1]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--instance--late_initdb--group"></a>`group`
Data type: `String[1]`
Overrides the default postgres user group to be used for related files in the file system.
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--instance--late_initdb--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to the psql command.
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--instance--late_initdb--port"></a>`port`
Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems,
changing the port causes the server to come to a full stop before being able to make the change.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--instance--late_initdb--module_workdir"></a>`module_workdir`
Data type: `Stdlib::Absolutepath`
Working directory for the PostgreSQL module
Default value: `$postgresql::server::module_workdir`
### <a name="postgresql--server--instance--passwd"></a>`postgresql::server::instance::passwd`
Overrides the default PostgreSQL superuser
#### Parameters
The following parameters are available in the `postgresql::server::instance::passwd` defined type:
* [`user`](#-postgresql--server--instance--passwd--user)
* [`group`](#-postgresql--server--instance--passwd--group)
* [`psql_path`](#-postgresql--server--instance--passwd--psql_path)
* [`port`](#-postgresql--server--instance--passwd--port)
* [`database`](#-postgresql--server--instance--passwd--database)
* [`module_workdir`](#-postgresql--server--instance--passwd--module_workdir)
* [`postgres_password`](#-postgresql--server--instance--passwd--postgres_password)
##### <a name="-postgresql--server--instance--passwd--user"></a>`user`
Data type: `String[1]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--instance--passwd--group"></a>`group`
Data type: `String[1]`
Overrides the default postgres user group to be used for related files in the file system.
Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--instance--passwd--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to the psql command.
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--instance--passwd--port"></a>`port`
Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems,
changing the port causes the server to come to a full stop before being able to make the change.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--instance--passwd--database"></a>`database`
Data type: `String[1]`
Specifies the name of the database to connect with. On most systems this is 'postgres'.
Default value: `$postgresql::server::default_database`
##### <a name="-postgresql--server--instance--passwd--module_workdir"></a>`module_workdir`
Data type: `Stdlib::Absolutepath`
Working directory for the PostgreSQL module
Default value: `$postgresql::server::module_workdir`
##### <a name="-postgresql--server--instance--passwd--postgres_password"></a>`postgres_password`
Data type: `Optional[Variant[String[1], Sensitive[String[1]], Integer]]`
Sets the password for the postgres user to your specified value. By default, this setting uses the superuser account in the Postgres
database, with a user called postgres and no password.
Default value: `$postgresql::server::postgres_password`
### <a name="postgresql--server--instance--reload"></a>`postgresql::server::instance::reload`
Overrides the default reload or status command for your PostgreSQL service
#### Parameters
The following parameters are available in the `postgresql::server::instance::reload` defined type:
* [`service_reload`](#-postgresql--server--instance--reload--service_reload)
* [`service_status`](#-postgresql--server--instance--reload--service_status)
##### <a name="-postgresql--server--instance--reload--service_reload"></a>`service_reload`
Data type: `String[1]`
Overrides the default reload command for your PostgreSQL service.
Default value: `$postgresql::server::service_reload`
##### <a name="-postgresql--server--instance--reload--service_status"></a>`service_status`
Data type: `String[1]`
Overrides the default status check command for your PostgreSQL service.
Default value: `$postgresql::server::service_status`
### <a name="postgresql--server--instance--service"></a>`postgresql::server::instance::service`
Manages the service for the postgres main instance (default) or additional instances
#### Parameters
The following parameters are available in the `postgresql::server::instance::service` defined type:
* [`service_ensure`](#-postgresql--server--instance--service--service_ensure)
* [`service_enable`](#-postgresql--server--instance--service--service_enable)
* [`service_manage`](#-postgresql--server--instance--service--service_manage)
* [`service_name`](#-postgresql--server--instance--service--service_name)
* [`service_provider`](#-postgresql--server--instance--service--service_provider)
* [`service_status`](#-postgresql--server--instance--service--service_status)
* [`user`](#-postgresql--server--instance--service--user)
* [`port`](#-postgresql--server--instance--service--port)
* [`default_database`](#-postgresql--server--instance--service--default_database)
* [`psql_path`](#-postgresql--server--instance--service--psql_path)
* [`connect_settings`](#-postgresql--server--instance--service--connect_settings)
##### <a name="-postgresql--server--instance--service--service_ensure"></a>`service_ensure`
Data type: `Variant[Enum['running', 'stopped'], Boolean]`
Ensure service is installed
Default value: `$postgresql::server::service_ensure`
##### <a name="-postgresql--server--instance--service--service_enable"></a>`service_enable`
Data type: `Boolean`
Enable the PostgreSQL service
Default value: `$postgresql::server::service_enable`
##### <a name="-postgresql--server--instance--service--service_manage"></a>`service_manage`
Data type: `Boolean`
Defines whether or not Puppet should manage the service.
Default value: `$postgresql::server::service_manage`
##### <a name="-postgresql--server--instance--service--service_name"></a>`service_name`
Data type: `String[1]`
Overrides the default PostgreSQL service name.
Default value: `$postgresql::server::service_name`
##### <a name="-postgresql--server--instance--service--service_provider"></a>`service_provider`
Data type: `Optional[String[1]]`
Overrides the default PostgreSQL service provider.
Default value: `$postgresql::server::service_provider`
##### <a name="-postgresql--server--instance--service--service_status"></a>`service_status`
Data type: `String[1]`
Overrides the default status check command for your PostgreSQL service.
Default value: `$postgresql::server::service_status`
##### <a name="-postgresql--server--instance--service--user"></a>`user`
Data type: `String[1]`
Overrides the default PostgreSQL super user and owner of PostgreSQL related files in the file system.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--instance--service--port"></a>`port`
Data type: `Stdlib::Port`
Specifies the port for the PostgreSQL server to listen on.
Note: The same port number is used for all IP addresses the server listens on. Also, for Red Hat systems and early Debian systems,
changing the port causes the server to come to a full stop before being able to make the change.
Default value: 5432. Meaning the Postgres server listens on TCP port 5432.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--instance--service--default_database"></a>`default_database`
Data type: `String[1]`
Specifies the name of the default database to connect with. On most systems this is 'postgres'.
Default value: `$postgresql::server::default_database`
##### <a name="-postgresql--server--instance--service--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Specifies the path to the psql command.
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--instance--service--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server. Becomes the default for other defined types,
such as postgresql::server::role.
Default value: `$postgresql::server::default_connect_settings`
### <a name="postgresql--server--pg_hba_rule"></a>`postgresql::server::pg_hba_rule`
This resource manages an individual rule that applies to the file defined in target.
#### Parameters
The following parameters are available in the `postgresql::server::pg_hba_rule` defined type:
* [`type`](#-postgresql--server--pg_hba_rule--type)
* [`database`](#-postgresql--server--pg_hba_rule--database)
* [`user`](#-postgresql--server--pg_hba_rule--user)
* [`auth_method`](#-postgresql--server--pg_hba_rule--auth_method)
* [`address`](#-postgresql--server--pg_hba_rule--address)
* [`description`](#-postgresql--server--pg_hba_rule--description)
* [`auth_option`](#-postgresql--server--pg_hba_rule--auth_option)
* [`order`](#-postgresql--server--pg_hba_rule--order)
* [`target`](#-postgresql--server--pg_hba_rule--target)
* [`postgresql_version`](#-postgresql--server--pg_hba_rule--postgresql_version)
##### <a name="-postgresql--server--pg_hba_rule--type"></a>`type`
Data type: `Postgresql::Pg_hba_rule_type`
Sets the type of rule.
##### <a name="-postgresql--server--pg_hba_rule--database"></a>`database`
Data type: `String[1]`
Sets a comma-separated list of databases that this rule matches.
##### <a name="-postgresql--server--pg_hba_rule--user"></a>`user`
Data type: `String[1]`
Sets a comma-separated list of users that this rule matches.
##### <a name="-postgresql--server--pg_hba_rule--auth_method"></a>`auth_method`
Data type: `String[1]`
Provides the method that is used for authentication for the connection that this rule matches.
Described further in the PostgreSQL pg_hba.conf documentation.
##### <a name="-postgresql--server--pg_hba_rule--address"></a>`address`
Data type: `Optional[Postgresql::Pg_hba_rule_address]`
Sets a address for this rule matching when the type is not 'local'.
Value can either be IPv4 CIDR, IPv6 CIDR, a FQDN, the strings 'all', 'samehost' or 'samenet' or a domain either with or without starting
dot (.) https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
Default value: `undef`
##### <a name="-postgresql--server--pg_hba_rule--description"></a>`description`
Data type: `String[1]`
Defines a longer description for this rule, if required. This description is placed in the comments above the rule in pg_hba.conf.
Default value: 'none'.
Default value: `'none'`
##### <a name="-postgresql--server--pg_hba_rule--auth_option"></a>`auth_option`
Data type: `Optional[String]`
For certain auth_method settings there are extra options that can be passed. Consult the PostgreSQL pg_hba.conf documentation for
further details.
Default value: `undef`
##### <a name="-postgresql--server--pg_hba_rule--order"></a>`order`
Data type: `Variant[String, Integer]`
Sets an order for placing the rule in pg_hba.conf. This can be either a string or an integer. If it is an integer, it will be converted
to a string by zero-padding it to three digits. E.g. 42 will be zero-padded to the string '042'. The pg_hba_rule fragments are sorted
using the alpha sorting order.
Default value: 150.
Default value: `150`
##### <a name="-postgresql--server--pg_hba_rule--target"></a>`target`
Data type: `Stdlib::Absolutepath`
Provides the target for the rule, and is generally an internal only property. Use with caution.
Default value: `$postgresql::server::pg_hba_conf_path`
##### <a name="-postgresql--server--pg_hba_rule--postgresql_version"></a>`postgresql_version`
Data type: `String`
Manages pg_hba.conf without managing the entire PostgreSQL instance.
Default value: `$postgresql::server::_version`
### <a name="postgresql--server--pg_ident_rule"></a>`postgresql::server::pg_ident_rule`
This resource manages an individual rule that applies to the file defined in target.
#### Parameters
The following parameters are available in the `postgresql::server::pg_ident_rule` defined type:
* [`map_name`](#-postgresql--server--pg_ident_rule--map_name)
* [`system_username`](#-postgresql--server--pg_ident_rule--system_username)
* [`database_username`](#-postgresql--server--pg_ident_rule--database_username)
* [`description`](#-postgresql--server--pg_ident_rule--description)
* [`order`](#-postgresql--server--pg_ident_rule--order)
* [`target`](#-postgresql--server--pg_ident_rule--target)
##### <a name="-postgresql--server--pg_ident_rule--map_name"></a>`map_name`
Data type: `String[1]`
Sets the name of the user map that is used to refer to this mapping in pg_hba.conf.
##### <a name="-postgresql--server--pg_ident_rule--system_username"></a>`system_username`
Data type: `String[1]`
Specifies the operating system user name (the user name used to connect to the database).
##### <a name="-postgresql--server--pg_ident_rule--database_username"></a>`database_username`
Data type: `String[1]`
Specifies the user name of the database user.
The system_username is mapped to this user name.
##### <a name="-postgresql--server--pg_ident_rule--description"></a>`description`
Data type: `String[1]`
Sets a longer description for this rule if required.
This description is placed in the comments above the rule in pg_ident.conf.
Default value: `'none'`
##### <a name="-postgresql--server--pg_ident_rule--order"></a>`order`
Data type: `String[1]`
Defines an order for placing the mapping in pg_ident.conf. Default value: 150.
Default value: `'150'`
##### <a name="-postgresql--server--pg_ident_rule--target"></a>`target`
Data type: `Stdlib::Absolutepath`
Provides the target for the rule and is generally an internal only property. Use with caution.
Default value: `$postgresql::server::pg_ident_conf_path`
### <a name="postgresql--server--reassign_owned_by"></a>`postgresql::server::reassign_owned_by`
Define for reassigning the ownership of objects within a database.
* **Note** This enables us to force the a particular ownership for objects within a database
#### Parameters
The following parameters are available in the `postgresql::server::reassign_owned_by` defined type:
* [`old_role`](#-postgresql--server--reassign_owned_by--old_role)
* [`new_role`](#-postgresql--server--reassign_owned_by--new_role)
* [`db`](#-postgresql--server--reassign_owned_by--db)
* [`psql_user`](#-postgresql--server--reassign_owned_by--psql_user)
* [`port`](#-postgresql--server--reassign_owned_by--port)
* [`connect_settings`](#-postgresql--server--reassign_owned_by--connect_settings)
* [`group`](#-postgresql--server--reassign_owned_by--group)
* [`psql_path`](#-postgresql--server--reassign_owned_by--psql_path)
* [`instance`](#-postgresql--server--reassign_owned_by--instance)
##### <a name="-postgresql--server--reassign_owned_by--old_role"></a>`old_role`
Data type: `String`
Specifies the role or user who is the current owner of the objects in the specified db
##### <a name="-postgresql--server--reassign_owned_by--new_role"></a>`new_role`
Data type: `String`
Specifies the role or user who will be the new owner of these objects
##### <a name="-postgresql--server--reassign_owned_by--db"></a>`db`
Data type: `String`
Specifies the database to which the 'REASSIGN OWNED' will be applied
##### <a name="-postgresql--server--reassign_owned_by--psql_user"></a>`psql_user`
Data type: `String`
Specifies the OS user for running psql.
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--reassign_owned_by--port"></a>`port`
Data type: `Stdlib::Port`
Port to use when connecting.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--reassign_owned_by--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `$postgresql::server::default_connect_settings`
##### <a name="-postgresql--server--reassign_owned_by--group"></a>`group`
Data type: `String[1]`
Sets the OS group to run psql
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--reassign_owned_by--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Sets the path to psql command
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--reassign_owned_by--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
### <a name="postgresql--server--recovery"></a>`postgresql::server::recovery`
This resource manages the parameters that applies to the recovery.conf template.
* **Note** Allows you to create the content for recovery.conf. For more details see the usage example and the PostgreSQL documentation.
Every parameter value is a string set in the template except recovery_target_inclusive, pause_at_recovery_target, standby_mode and
recovery_min_apply_delay.
A detailed description of all listed parameters can be found in the PostgreSQL documentation.
Only the specified parameters are recognized in the template. The recovery.conf is only created if at least one parameter is set and
manage_recovery_conf is set to true.
#### Parameters
The following parameters are available in the `postgresql::server::recovery` defined type:
* [`restore_command`](#-postgresql--server--recovery--restore_command)
* [`archive_cleanup_command`](#-postgresql--server--recovery--archive_cleanup_command)
* [`recovery_end_command`](#-postgresql--server--recovery--recovery_end_command)
* [`recovery_target_name`](#-postgresql--server--recovery--recovery_target_name)
* [`recovery_target_time`](#-postgresql--server--recovery--recovery_target_time)
* [`recovery_target_xid`](#-postgresql--server--recovery--recovery_target_xid)
* [`recovery_target_inclusive`](#-postgresql--server--recovery--recovery_target_inclusive)
* [`recovery_target`](#-postgresql--server--recovery--recovery_target)
* [`recovery_target_timeline`](#-postgresql--server--recovery--recovery_target_timeline)
* [`pause_at_recovery_target`](#-postgresql--server--recovery--pause_at_recovery_target)
* [`standby_mode`](#-postgresql--server--recovery--standby_mode)
* [`primary_conninfo`](#-postgresql--server--recovery--primary_conninfo)
* [`primary_slot_name`](#-postgresql--server--recovery--primary_slot_name)
* [`trigger_file`](#-postgresql--server--recovery--trigger_file)
* [`recovery_min_apply_delay`](#-postgresql--server--recovery--recovery_min_apply_delay)
* [`target`](#-postgresql--server--recovery--target)
##### <a name="-postgresql--server--recovery--restore_command"></a>`restore_command`
Data type: `Optional[String]`
The shell command to execute to retrieve an archived segment of the WAL file series.
Default value: `undef`
##### <a name="-postgresql--server--recovery--archive_cleanup_command"></a>`archive_cleanup_command`
Data type: `Optional[String[1]]`
This optional parameter specifies a shell command that will be executed at every restartpoint.
Default value: `undef`
##### <a name="-postgresql--server--recovery--recovery_end_command"></a>`recovery_end_command`
Data type: `Optional[String[1]]`
This parameter specifies a shell command that will be executed once only at the end of recovery.
Default value: `undef`
##### <a name="-postgresql--server--recovery--recovery_target_name"></a>`recovery_target_name`
Data type: `Optional[String[1]]`
This parameter specifies the named restore point (created with pg_create_restore_point()) to which recovery will proceed.
Default value: `undef`
##### <a name="-postgresql--server--recovery--recovery_target_time"></a>`recovery_target_time`
Data type: `Optional[String[1]]`
This parameter specifies the time stamp up to which recovery will proceed.
Default value: `undef`
##### <a name="-postgresql--server--recovery--recovery_target_xid"></a>`recovery_target_xid`
Data type: `Optional[String[1]]`
This parameter specifies the transaction ID up to which recovery will proceed.
Default value: `undef`
##### <a name="-postgresql--server--recovery--recovery_target_inclusive"></a>`recovery_target_inclusive`
Data type: `Optional[Boolean]`
Specifies whether to stop just after the specified recovery target (true), or just before the recovery target (false).
Default value: `undef`
##### <a name="-postgresql--server--recovery--recovery_target"></a>`recovery_target`
Data type: `Optional[String[1]]`
This parameter specifies that recovery should end as soon as a consistent state is reached, i.e. as early as possible.
Default value: `undef`
##### <a name="-postgresql--server--recovery--recovery_target_timeline"></a>`recovery_target_timeline`
Data type: `Optional[String[1]]`
Specifies recovering into a particular timeline.
Default value: `undef`
##### <a name="-postgresql--server--recovery--pause_at_recovery_target"></a>`pause_at_recovery_target`
Data type: `Optional[Boolean]`
Specifies whether recovery should pause when the recovery target is reached.
Default value: `undef`
##### <a name="-postgresql--server--recovery--standby_mode"></a>`standby_mode`
Data type: `Optional[String[1]]`
Specifies whether to start the PostgreSQL server as a standby.
Default value: `undef`
##### <a name="-postgresql--server--recovery--primary_conninfo"></a>`primary_conninfo`
Data type: `Optional[String[1]]`
Specifies a connection string to be used for the standby server to connect with the primary.
Default value: `undef`
##### <a name="-postgresql--server--recovery--primary_slot_name"></a>`primary_slot_name`
Data type: `Optional[String[1]]`
Optionally specifies an existing replication slot to be used when connecting to the primary via streaming replication to control
resource removal on the upstream node.
Default value: `undef`
##### <a name="-postgresql--server--recovery--trigger_file"></a>`trigger_file`
Data type: `Optional[String[1]]`
Specifies a trigger file whose presence ends recovery in the standby.
Default value: `undef`
##### <a name="-postgresql--server--recovery--recovery_min_apply_delay"></a>`recovery_min_apply_delay`
Data type: `Optional[Integer]`
This parameter allows you to delay recovery by a fixed period of time, measured in milliseconds if no unit is specified.
Default value: `undef`
##### <a name="-postgresql--server--recovery--target"></a>`target`
Data type: `Stdlib::Absolutepath`
Provides the target for the rule, and is generally an internal only property. Use with caution.
Default value: `$postgresql::server::recovery_conf_path`
### <a name="postgresql--server--role"></a>`postgresql::server::role`
Define for creating a database role.
#### Parameters
The following parameters are available in the `postgresql::server::role` defined type:
* [`update_password`](#-postgresql--server--role--update_password)
* [`password_hash`](#-postgresql--server--role--password_hash)
* [`createdb`](#-postgresql--server--role--createdb)
* [`createrole`](#-postgresql--server--role--createrole)
* [`db`](#-postgresql--server--role--db)
* [`port`](#-postgresql--server--role--port)
* [`login`](#-postgresql--server--role--login)
* [`inherit`](#-postgresql--server--role--inherit)
* [`superuser`](#-postgresql--server--role--superuser)
* [`replication`](#-postgresql--server--role--replication)
* [`connection_limit`](#-postgresql--server--role--connection_limit)
* [`username`](#-postgresql--server--role--username)
* [`connect_settings`](#-postgresql--server--role--connect_settings)
* [`ensure`](#-postgresql--server--role--ensure)
* [`psql_user`](#-postgresql--server--role--psql_user)
* [`psql_group`](#-postgresql--server--role--psql_group)
* [`psql_path`](#-postgresql--server--role--psql_path)
* [`module_workdir`](#-postgresql--server--role--module_workdir)
* [`hash`](#-postgresql--server--role--hash)
* [`salt`](#-postgresql--server--role--salt)
* [`instance`](#-postgresql--server--role--instance)
##### <a name="-postgresql--server--role--update_password"></a>`update_password`
Data type: `Boolean`
If set to true, updates the password on changes. Set this to false to not modify the role's password after creation.
Default value: `true`
##### <a name="-postgresql--server--role--password_hash"></a>`password_hash`
Data type: `Variant[Boolean, String, Sensitive[String]]`
Sets the hash to use during password creation.
Default value: `false`
##### <a name="-postgresql--server--role--createdb"></a>`createdb`
Data type: `Boolean`
Specifies whether to grant the ability to create new databases with this role.
Default value: `false`
##### <a name="-postgresql--server--role--createrole"></a>`createrole`
Data type: `Boolean`
Specifies whether to grant the ability to create new roles with this role.
Default value: `false`
##### <a name="-postgresql--server--role--db"></a>`db`
Data type: `String[1]`
Database used to connect to.
Default value: `$postgresql::server::default_database`
##### <a name="-postgresql--server--role--port"></a>`port`
Data type: `Stdlib::Port`
Port to use when connecting.
Default value: `postgresql::default('port')`
##### <a name="-postgresql--server--role--login"></a>`login`
Data type: `Boolean`
Specifies whether to grant login capability for the new role.
Default value: `true`
##### <a name="-postgresql--server--role--inherit"></a>`inherit`
Data type: `Boolean`
Specifies whether to grant inherit capability for the new role.
Default value: `true`
##### <a name="-postgresql--server--role--superuser"></a>`superuser`
Data type: `Boolean`
Specifies whether to grant super user capability for the new role.
Default value: `false`
##### <a name="-postgresql--server--role--replication"></a>`replication`
Data type: `Boolean`
Provides provides replication capabilities for this role if set to true.
Default value: `false`
##### <a name="-postgresql--server--role--connection_limit"></a>`connection_limit`
Data type: `String[1]`
Specifies how many concurrent connections the role can make. Default value: '-1', meaning no limit.
Default value: `'-1'`
##### <a name="-postgresql--server--role--username"></a>`username`
Data type: `String[1]`
Defines the username of the role to create.
Default value: `$title`
##### <a name="-postgresql--server--role--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `$postgresql::server::default_connect_settings`
##### <a name="-postgresql--server--role--ensure"></a>`ensure`
Data type: `Enum['present', 'absent']`
Specify whether to create or drop the role. Specifying 'present' creates the role. Specifying 'absent' drops the role.
Default value: `'present'`
##### <a name="-postgresql--server--role--psql_user"></a>`psql_user`
Data type: `String[1]`
Sets the OS user to run psql
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--role--psql_group"></a>`psql_group`
Data type: `String[1]`
Sets the OS group to run psql
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--role--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Sets path to psql command
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--role--module_workdir"></a>`module_workdir`
Data type: `String[1]`
Specifies working directory under which the psql command should be executed.
May need to specify if '/tmp' is on volume mounted with noexec option.
Default value: `$postgresql::server::module_workdir`
##### <a name="-postgresql--server--role--hash"></a>`hash`
Data type: `Optional[Enum['md5', 'scram-sha-256']]`
Specify the hash method for pg password
Default value: `undef`
##### <a name="-postgresql--server--role--salt"></a>`salt`
Data type: `Optional[Variant[String[1], Integer]]`
Specify the salt use for the scram-sha-256 encoding password (default username)
Default value: `undef`
##### <a name="-postgresql--server--role--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
### <a name="postgresql--server--schema"></a>`postgresql::server::schema`
Create a new schema.
* **Note** The database must exist and the PostgreSQL user should have enough privileges
#### Examples
#####
```puppet
postgresql::server::schema {'private':
db => 'template1',
}
```
#### Parameters
The following parameters are available in the `postgresql::server::schema` defined type:
* [`db`](#-postgresql--server--schema--db)
* [`owner`](#-postgresql--server--schema--owner)
* [`schema`](#-postgresql--server--schema--schema)
* [`connect_settings`](#-postgresql--server--schema--connect_settings)
* [`port`](#-postgresql--server--schema--port)
* [`user`](#-postgresql--server--schema--user)
* [`group`](#-postgresql--server--schema--group)
* [`psql_path`](#-postgresql--server--schema--psql_path)
* [`module_workdir`](#-postgresql--server--schema--module_workdir)
* [`instance`](#-postgresql--server--schema--instance)
##### <a name="-postgresql--server--schema--db"></a>`db`
Data type: `String[1]`
Required. Sets the name of the database in which to create this schema.
Default value: `$postgresql::server::default_database`
##### <a name="-postgresql--server--schema--owner"></a>`owner`
Data type: `Optional[String[1]]`
Sets the default owner of the schema.
Default value: `undef`
##### <a name="-postgresql--server--schema--schema"></a>`schema`
Data type: `String[1]`
Sets the name of the schema.
Default value: `$title`
##### <a name="-postgresql--server--schema--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `$postgresql::server::default_connect_settings`
##### <a name="-postgresql--server--schema--port"></a>`port`
Data type: `Stdlib::Port`
the post the postgresql instance is listening on.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--schema--user"></a>`user`
Data type: `String[1]`
Sets the OS user to run psql
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--schema--group"></a>`group`
Data type: `String[1]`
Sets the OS group to run psql
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--schema--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Sets path to psql command
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--schema--module_workdir"></a>`module_workdir`
Data type: `Stdlib::Absolutepath`
Specifies working directory under which the psql command should be executed.
May need to specify if '/tmp' is on volume mounted with noexec option.
Default value: `$postgresql::server::module_workdir`
##### <a name="-postgresql--server--schema--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
### <a name="postgresql--server--table_grant"></a>`postgresql::server::table_grant`
This resource wraps the grant resource to manage table grants specifically.
#### Parameters
The following parameters are available in the `postgresql::server::table_grant` defined type:
* [`privilege`](#-postgresql--server--table_grant--privilege)
* [`table`](#-postgresql--server--table_grant--table)
* [`db`](#-postgresql--server--table_grant--db)
* [`role`](#-postgresql--server--table_grant--role)
* [`ensure`](#-postgresql--server--table_grant--ensure)
* [`port`](#-postgresql--server--table_grant--port)
* [`psql_db`](#-postgresql--server--table_grant--psql_db)
* [`psql_user`](#-postgresql--server--table_grant--psql_user)
* [`connect_settings`](#-postgresql--server--table_grant--connect_settings)
* [`onlyif_exists`](#-postgresql--server--table_grant--onlyif_exists)
* [`instance`](#-postgresql--server--table_grant--instance)
##### <a name="-postgresql--server--table_grant--privilege"></a>`privilege`
Data type:
```puppet
Enum['ALL', 'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER', 'all', 'select', 'insert', 'update', 'delete',
'truncate', 'references', 'trigger']
```
Specifies comma-separated list of privileges to grant.
Valid options: 'ALL', 'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'.
##### <a name="-postgresql--server--table_grant--table"></a>`table`
Data type: `String[1]`
Specifies the table to which you are granting access.
##### <a name="-postgresql--server--table_grant--db"></a>`db`
Data type: `String[1]`
Specifies which database the table is in.
##### <a name="-postgresql--server--table_grant--role"></a>`role`
Data type: `String[1]`
Specifies the role or user to whom you are granting access.
##### <a name="-postgresql--server--table_grant--ensure"></a>`ensure`
Data type: `Optional[Enum['present', 'absent']]`
Specifies whether to grant or revoke the privilege. Default is to grant the privilege.
Default value: `undef`
##### <a name="-postgresql--server--table_grant--port"></a>`port`
Data type: `Optional[Stdlib::Port]`
Port to use when connecting.
Default value: `undef`
##### <a name="-postgresql--server--table_grant--psql_db"></a>`psql_db`
Data type: `Optional[String[1]]`
Specifies the database to execute the grant against. This should not ordinarily be changed from the default.
Default value: `undef`
##### <a name="-postgresql--server--table_grant--psql_user"></a>`psql_user`
Data type: `Optional[String[1]]`
Specifies the OS user for running psql.
Default value: `undef`
##### <a name="-postgresql--server--table_grant--connect_settings"></a>`connect_settings`
Data type: `Optional[Hash]`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `undef`
##### <a name="-postgresql--server--table_grant--onlyif_exists"></a>`onlyif_exists`
Data type: `Boolean`
Create grant only if it doesn't exist.
Default value: `false`
##### <a name="-postgresql--server--table_grant--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
### <a name="postgresql--server--tablespace"></a>`postgresql::server::tablespace`
This module creates tablespace.
#### Parameters
The following parameters are available in the `postgresql::server::tablespace` defined type:
* [`location`](#-postgresql--server--tablespace--location)
* [`manage_location`](#-postgresql--server--tablespace--manage_location)
* [`owner`](#-postgresql--server--tablespace--owner)
* [`spcname`](#-postgresql--server--tablespace--spcname)
* [`connect_settings`](#-postgresql--server--tablespace--connect_settings)
* [`port`](#-postgresql--server--tablespace--port)
* [`user`](#-postgresql--server--tablespace--user)
* [`group`](#-postgresql--server--tablespace--group)
* [`psql_path`](#-postgresql--server--tablespace--psql_path)
* [`module_workdir`](#-postgresql--server--tablespace--module_workdir)
* [`instance`](#-postgresql--server--tablespace--instance)
##### <a name="-postgresql--server--tablespace--location"></a>`location`
Data type: `String[1]`
Specifies the path to locate this tablespace.
##### <a name="-postgresql--server--tablespace--manage_location"></a>`manage_location`
Data type: `Boolean`
Set to false if you have file{ $location: } already defined
Default value: `true`
##### <a name="-postgresql--server--tablespace--owner"></a>`owner`
Data type: `Optional[String[1]]`
Specifies the default owner of the tablespace.
Default value: `undef`
##### <a name="-postgresql--server--tablespace--spcname"></a>`spcname`
Data type: `String[1]`
Specifies the name of the tablespace.
Default value: `$title`
##### <a name="-postgresql--server--tablespace--connect_settings"></a>`connect_settings`
Data type: `Hash`
Specifies a hash of environment variables used when connecting to a remote server.
Default value: `$postgresql::server::default_connect_settings`
##### <a name="-postgresql--server--tablespace--port"></a>`port`
Data type: `Stdlib::Port`
the port of the postgresql instance that sould be used.
Default value: `$postgresql::server::port`
##### <a name="-postgresql--server--tablespace--user"></a>`user`
Data type: `String[1]`
Sets the OS user to run psql
Default value: `$postgresql::server::user`
##### <a name="-postgresql--server--tablespace--group"></a>`group`
Data type: `String[1]`
Sets the OS group to run psql
Default value: `$postgresql::server::group`
##### <a name="-postgresql--server--tablespace--psql_path"></a>`psql_path`
Data type: `Stdlib::Absolutepath`
Sets path to psql command
Default value: `$postgresql::server::psql_path`
##### <a name="-postgresql--server--tablespace--module_workdir"></a>`module_workdir`
Data type: `String[1]`
Specifies working directory under which the psql command should be executed.
May need to specify if '/tmp' is on volume mounted with noexec option.
Default value: `$postgresql::server::module_workdir`
##### <a name="-postgresql--server--tablespace--instance"></a>`instance`
Data type: `String[1]`
The name of the Postgresql database instance.
Default value: `'main'`
### <a name="postgresql--server_instance"></a>`postgresql::server_instance`
define to install and manage additional postgresql instances
#### Parameters
The following parameters are available in the `postgresql::server_instance` defined type:
* [`instance_name`](#-postgresql--server_instance--instance_name)
* [`instance_user`](#-postgresql--server_instance--instance_user)
* [`instance_group`](#-postgresql--server_instance--instance_group)
* [`instance_user_homedirectory`](#-postgresql--server_instance--instance_user_homedirectory)
* [`manage_instance_user_and_group`](#-postgresql--server_instance--manage_instance_user_and_group)
* [`instance_directories`](#-postgresql--server_instance--instance_directories)
* [`initdb_settings`](#-postgresql--server_instance--initdb_settings)
* [`config_settings`](#-postgresql--server_instance--config_settings)
* [`service_settings`](#-postgresql--server_instance--service_settings)
* [`passwd_settings`](#-postgresql--server_instance--passwd_settings)
* [`roles`](#-postgresql--server_instance--roles)
* [`config_entries`](#-postgresql--server_instance--config_entries)
* [`pg_hba_rules`](#-postgresql--server_instance--pg_hba_rules)
* [`databases`](#-postgresql--server_instance--databases)
* [`databases_and_users`](#-postgresql--server_instance--databases_and_users)
* [`database_grants`](#-postgresql--server_instance--database_grants)
* [`table_grants`](#-postgresql--server_instance--table_grants)
##### <a name="-postgresql--server_instance--instance_name"></a>`instance_name`
Data type: `String[1]`
The name of the instance.
Default value: `$name`
##### <a name="-postgresql--server_instance--instance_user"></a>`instance_user`
Data type: `String[1]`
The user to run the instance as.
Default value: `$instance_name`
##### <a name="-postgresql--server_instance--instance_group"></a>`instance_group`
Data type: `String[1]`
The group to run the instance as.
Default value: `$instance_name`
##### <a name="-postgresql--server_instance--instance_user_homedirectory"></a>`instance_user_homedirectory`
Data type: `Stdlib::Absolutepath`
The home directory of the instance user.
Default value: `"/opt/pgsql/data/home/${instance_user}"`
##### <a name="-postgresql--server_instance--manage_instance_user_and_group"></a>`manage_instance_user_and_group`
Data type: `Boolean`
Should Puppet manage the instance user and it's primary group?.
Default value: `true`
##### <a name="-postgresql--server_instance--instance_directories"></a>`instance_directories`
Data type: `Hash`
directories needed for the instance. Option to manage the directory properties for each directory.
Default value: `{}`
##### <a name="-postgresql--server_instance--initdb_settings"></a>`initdb_settings`
Data type: `Hash`
Specifies a hash witn parameters for postgresql::server::instance::initdb
Default value: `{}`
##### <a name="-postgresql--server_instance--config_settings"></a>`config_settings`
Data type: `Hash`
Specifies a hash with parameters for postgresql::server::instance::config
Default value: `{}`
##### <a name="-postgresql--server_instance--service_settings"></a>`service_settings`
Data type: `Hash`
Specifies a hash with parameters for postgresql::server:::instance::service
Default value: `{}`
##### <a name="-postgresql--server_instance--passwd_settings"></a>`passwd_settings`
Data type: `Hash`
Specifies a hash with parameters for postgresql::server::instance::passwd
Default value: `{}`
##### <a name="-postgresql--server_instance--roles"></a>`roles`
Data type: `Hash`
Specifies a hash from which to generate postgresql::server::role resources.
Default value: `{}`
##### <a name="-postgresql--server_instance--config_entries"></a>`config_entries`
Data type: `Hash`
Specifies a hash from which to generate postgresql::server::config_entry resources.
Default value: `{}`
##### <a name="-postgresql--server_instance--pg_hba_rules"></a>`pg_hba_rules`
Data type: `Hash`
Specifies a hash from which to generate postgresql::server::pg_hba_rule resources.
Default value: `{}`
##### <a name="-postgresql--server_instance--databases"></a>`databases`
Data type: `Hash`
Specifies a hash from which to generate postgresql::server::database resources.
Default value: `{}`
##### <a name="-postgresql--server_instance--databases_and_users"></a>`databases_and_users`
Data type: `Hash`
Specifies a hash from which to generate postgresql::server::db resources.
Default value: `{}`
##### <a name="-postgresql--server_instance--database_grants"></a>`database_grants`
Data type: `Hash`
Specifies a hash from which to generate postgresql::server::database_grant resources.
Default value: `{}`
##### <a name="-postgresql--server_instance--table_grants"></a>`table_grants`
Data type: `Hash`
Specifies a hash from which to generate postgresql::server::table_grant resources.
Default value: `{}`
## Resource types
### <a name="postgresql_conf"></a>`postgresql_conf`
This type allows puppet to manage postgresql.conf parameters.
#### Properties
The following properties are available in the `postgresql_conf` type.
##### `comment`
Valid values: `%r{^[\w\W]+$}`
The comment to set for this parameter.
##### `ensure`
Valid values: `present`, `absent`
The basic property that the resource should be in.
Default value: `present`
##### `value`
Valid values: `%r{^(\S.*)?$}`
The value to set for this parameter.
#### Parameters
The following parameters are available in the `postgresql_conf` type.
* [`key`](#-postgresql_conf--key)
* [`name`](#-postgresql_conf--name)
* [`provider`](#-postgresql_conf--provider)
* [`target`](#-postgresql_conf--target)
##### <a name="-postgresql_conf--key"></a>`key`
Valid values: `%r{^[\w.]+$}`
The Postgresql parameter to manage.
##### <a name="-postgresql_conf--name"></a>`name`
Valid values: `%r{^[\w.]+$}`
namevar
A unique title for the resource.
##### <a name="-postgresql_conf--provider"></a>`provider`
The specific backend to use for this `postgresql_conf` resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
##### <a name="-postgresql_conf--target"></a>`target`
Valid values: `%r{^/\S+[a-z0-9(/)-]*\w+.conf$}`
The path to the postgresql config file
### <a name="postgresql_conn_validator"></a>`postgresql_conn_validator`
Verify that a connection can be successfully established between a node
and the PostgreSQL server. Its primary use is as a precondition to
prevent configuration changes from being applied if the PostgreSQL
server cannot be reached, but it could potentially be used for other
purposes such as monitoring.
#### Properties
The following properties are available in the `postgresql_conn_validator` type.
##### `ensure`
Valid values: `present`, `absent`
Ensure connection validation
Default value: `present`
#### Parameters
The following parameters are available in the `postgresql_conn_validator` type.
* [`command`](#-postgresql_conn_validator--command)
* [`connect_settings`](#-postgresql_conn_validator--connect_settings)
* [`db_name`](#-postgresql_conn_validator--db_name)
* [`db_password`](#-postgresql_conn_validator--db_password)
* [`db_username`](#-postgresql_conn_validator--db_username)
* [`host`](#-postgresql_conn_validator--host)
* [`name`](#-postgresql_conn_validator--name)
* [`port`](#-postgresql_conn_validator--port)
* [`provider`](#-postgresql_conn_validator--provider)
* [`psql_path`](#-postgresql_conn_validator--psql_path)
* [`run_as`](#-postgresql_conn_validator--run_as)
* [`sleep`](#-postgresql_conn_validator--sleep)
* [`tries`](#-postgresql_conn_validator--tries)
##### <a name="-postgresql_conn_validator--command"></a>`command`
Command to run against target database.
Default value: `SELECT 1`
##### <a name="-postgresql_conn_validator--connect_settings"></a>`connect_settings`
Hash of environment variables for connection to a db.
##### <a name="-postgresql_conn_validator--db_name"></a>`db_name`
The name of the database you are trying to validate a connection with.
##### <a name="-postgresql_conn_validator--db_password"></a>`db_password`
The password required to access the target PostgreSQL database.
##### <a name="-postgresql_conn_validator--db_username"></a>`db_username`
A user that has access to the target PostgreSQL database.
##### <a name="-postgresql_conn_validator--host"></a>`host`
The DNS name or IP address of the server where PostgreSQL should be running.
##### <a name="-postgresql_conn_validator--name"></a>`name`
namevar
An arbitrary name used as the identity of the resource.
##### <a name="-postgresql_conn_validator--port"></a>`port`
The port that the PostgreSQL server should be listening on.
##### <a name="-postgresql_conn_validator--provider"></a>`provider`
The specific backend to use for this `postgresql_conn_validator` resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
##### <a name="-postgresql_conn_validator--psql_path"></a>`psql_path`
Path to the psql command.
##### <a name="-postgresql_conn_validator--run_as"></a>`run_as`
System user that will run the psql command.
##### <a name="-postgresql_conn_validator--sleep"></a>`sleep`
The length of sleep time between connection tries.
Default value: `2`
##### <a name="-postgresql_conn_validator--tries"></a>`tries`
The number of tries to validate the connection to the target PostgreSQL database.
Default value: `10`
### <a name="postgresql_psql"></a>`postgresql_psql`
An arbitrary tag for your own reference; the name of the message.
#### Properties
The following properties are available in the `postgresql_psql` type.
##### `command`
The SQL command to execute via psql.
#### Parameters
The following parameters are available in the `postgresql_psql` type.
* [`connect_settings`](#-postgresql_psql--connect_settings)
* [`cwd`](#-postgresql_psql--cwd)
* [`db`](#-postgresql_psql--db)
* [`environment`](#-postgresql_psql--environment)
* [`instance`](#-postgresql_psql--instance)
* [`name`](#-postgresql_psql--name)
* [`onlyif`](#-postgresql_psql--onlyif)
* [`port`](#-postgresql_psql--port)
* [`provider`](#-postgresql_psql--provider)
* [`psql_group`](#-postgresql_psql--psql_group)
* [`psql_path`](#-postgresql_psql--psql_path)
* [`psql_user`](#-postgresql_psql--psql_user)
* [`refreshonly`](#-postgresql_psql--refreshonly)
* [`search_path`](#-postgresql_psql--search_path)
* [`sensitive`](#-postgresql_psql--sensitive)
* [`unless`](#-postgresql_psql--unless)
##### <a name="-postgresql_psql--connect_settings"></a>`connect_settings`
Connection settings that will be used when connecting to postgres
##### <a name="-postgresql_psql--cwd"></a>`cwd`
The working directory under which the psql command should be executed.
Default value: `/tmp`
##### <a name="-postgresql_psql--db"></a>`db`
The name of the database to execute the SQL command against, this overrides any PGDATABASE value in connect_settings
##### <a name="-postgresql_psql--environment"></a>`environment`
Any additional environment variables you want to set for a
SQL command. Multiple environment variables should be
specified as an array.
##### <a name="-postgresql_psql--instance"></a>`instance`
The postgresql instance under which the psql command should be executed.
Default value: `main`
##### <a name="-postgresql_psql--name"></a>`name`
namevar
An arbitrary tag for your own reference; the name of the message.
##### <a name="-postgresql_psql--onlyif"></a>`onlyif`
An optional SQL command to execute prior to the main :command;
this is generally intended to be used for idempotency, to check
for the existence of an object in the database to determine whether
or not the main SQL command needs to be executed at all.
##### <a name="-postgresql_psql--port"></a>`port`
The port of the database server to execute the SQL command against, this overrides any PGPORT value in connect_settings.
##### <a name="-postgresql_psql--provider"></a>`provider`
The specific backend to use for this `postgresql_psql` resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
##### <a name="-postgresql_psql--psql_group"></a>`psql_group`
The system user group account under which the psql command should be executed.
Default value: `postgres`
##### <a name="-postgresql_psql--psql_path"></a>`psql_path`
The path to psql executable.
Default value: `psql`
##### <a name="-postgresql_psql--psql_user"></a>`psql_user`
The system user account under which the psql command should be executed.
Default value: `postgres`
##### <a name="-postgresql_psql--refreshonly"></a>`refreshonly`
Valid values: `true`, `false`
If 'true', then the SQL will only be executed via a notify/subscribe event.
Default value: `false`
##### <a name="-postgresql_psql--search_path"></a>`search_path`
The schema search path to use when executing the SQL command
##### <a name="-postgresql_psql--sensitive"></a>`sensitive`
Valid values: `true`, `false`
If 'true', then the executed command will not be echoed into the log. Use this to protect sensitive information passing
through.
Default value: `false`
##### <a name="-postgresql_psql--unless"></a>`unless`
An optional SQL command to execute prior to the main :command;
this is generally intended to be used for idempotency, to check
for the existence of an object in the database to determine whether
or not the main SQL command needs to be executed at all.'
### <a name="postgresql_replication_slot"></a>`postgresql_replication_slot`
This type allows to create and destroy replication slots
to register warm standby replication on a Postgresql
primary server.
#### Properties
The following properties are available in the `postgresql_replication_slot` type.
##### `ensure`
Valid values: `present`, `absent`
The basic property that the resource should be in.
Default value: `present`
#### Parameters
The following parameters are available in the `postgresql_replication_slot` type.
* [`name`](#-postgresql_replication_slot--name)
* [`provider`](#-postgresql_replication_slot--provider)
##### <a name="-postgresql_replication_slot--name"></a>`name`
Valid values: `%r{^[a-z0-9_]+$}`
namevar
The name of the slot to create. Must be a valid replication slot name.
##### <a name="-postgresql_replication_slot--provider"></a>`provider`
The specific backend to use for this `postgresql_replication_slot` resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
## Functions
### <a name="postgresql--default"></a>`postgresql::default`
Type: Puppet Language
This function pull default values from the `params` class or `globals` class if the value is not present in `params`.
#### Examples
#####
```puppet
postgresql::default('variable')
```
#### `postgresql::default(String $parameter_name)`
The postgresql::default function.
Returns: `Any`
##### Examples
######
```puppet
postgresql::default('variable')
```
##### `parameter_name`
Data type: `String`
### <a name="postgresql--postgresql_escape"></a>`postgresql::postgresql_escape`
Type: Ruby 4.x API
This function escapes a string using [Dollar Quoting](https://www.postgresql.org/docs/12/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING) using a randomly generated tag if required.
#### `postgresql::postgresql_escape(String[1] $input_string)`
The postgresql::postgresql_escape function.
Returns: `String` A `Dollar Quoted` string
##### `input_string`
Data type: `String[1]`
The unescaped string you want to escape using `dollar quoting`
### <a name="postgresql--postgresql_password"></a>`postgresql::postgresql_password`
Type: Ruby 4.x API
This function returns the postgresql password hash from the clear text username / password
#### `postgresql::postgresql_password(Variant[String[1], Integer] $username, Variant[String[1], Sensitive[String[1]], Integer] $password, Optional[Boolean] $sensitive, Optional[Optional[Postgresql::Pg_password_encryption]] $hash, Optional[Optional[Variant[String[1], Integer]]] $salt)`
The postgresql::postgresql_password function.
Returns: `Variant[String, Sensitive[String]]` The postgresql password hash from the clear text username / password.
##### `username`
Data type: `Variant[String[1], Integer]`
The clear text `username`
##### `password`
Data type: `Variant[String[1], Sensitive[String[1]], Integer]`
The clear text `password`
##### `sensitive`
Data type: `Optional[Boolean]`
If the Postgresql-Passwordhash should be of Datatype Sensitive[String]
##### `hash`
Data type: `Optional[Optional[Postgresql::Pg_password_encryption]]`
Set type for password hash
Default value comes from `postgresql::params::password_encryption` and changes based on the `postgresql::globals::version`.
##### `salt`
Data type: `Optional[Optional[Variant[String[1], Integer]]]`
Use a specific salt value for scram-sha-256, default is username
### <a name="postgresql--prepend_sql_password"></a>`postgresql::prepend_sql_password`
Type: Ruby 4.x API
This function exists for usage of a role password that is a deferred function
#### `postgresql::prepend_sql_password(String $password)`
The postgresql::prepend_sql_password function.
Returns: `String`
##### `password`
Data type: `String`
The clear text `password`
### <a name="postgresql_escape"></a>`postgresql_escape`
Type: Ruby 4.x API
DEPRECATED. Use the namespaced function [`postgresql::postgresql_escape`](#postgresqlpostgresql_escape) instead.
#### `postgresql_escape(Any *$args)`
The postgresql_escape function.
Returns: `Any`
##### `*args`
Data type: `Any`
### <a name="postgresql_password"></a>`postgresql_password`
Type: Ruby 4.x API
DEPRECATED. Use the namespaced function [`postgresql::postgresql_password`](#postgresqlpostgresql_password) instead.
#### `postgresql_password(Any *$args)`
The postgresql_password function.
Returns: `Any`
##### `*args`
Data type: `Any`
## Data types
### <a name="Postgresql--Pg_hba_rule"></a>`Postgresql::Pg_hba_rule`
type for all parameters in the postgresql::server::hba_rule defined resource
* **See also**
* https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/manifests/server/pg_hba_rule.pp
Alias of
```puppet
Struct[{
Optional[description] => String,
type => Postgresql::Pg_hba_rule_type,
database => String,
user => String,
Optional[address] => Optional[Postgresql::Pg_hba_rule_address],
auth_method => String,
Optional[auth_option] => Optional[String],
Optional[order] => Variant[String,Integer],
Optional[target] => Stdlib::Absolutepath,
Optional[postgresql_version] => String,
}]
```
### <a name="Postgresql--Pg_hba_rule_address"></a>`Postgresql::Pg_hba_rule_address`
Supported address types
* **See also**
* https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
Alias of `Variant[Stdlib::IP::Address::V4::CIDR, Stdlib::IP::Address::V6::CIDR, Stdlib::Fqdn, Enum['all', 'samehost', 'samenet'], Pattern[/^\.(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9]$/]]`
### <a name="Postgresql--Pg_hba_rule_type"></a>`Postgresql::Pg_hba_rule_type`
enum for all different types for the pg_hba_conf
* **See also**
* https://www.postgresql.org/docs/current/auth-pg-hba-conf.html
Alias of `Enum['local', 'host', 'hostssl', 'hostnossl', 'hostgssenc', 'hostnogssenc']`
### <a name="Postgresql--Pg_hba_rules"></a>`Postgresql::Pg_hba_rules`
validates a hash of entries for postgresql::server::pg_hab_conf
* **See also**
* https://github.com/puppetlabs/puppetlabs-postgresql/blob/main/manifests/server/pg_hba_rule.pp
Alias of `Hash[String[1], Postgresql::Pg_hba_rule]`
### <a name="Postgresql--Pg_password_encryption"></a>`Postgresql::Pg_password_encryption`
the supported password_encryption
Alias of `Enum['md5', 'scram-sha-256']`
## Tasks
### <a name="sql"></a>`sql`
Allows you to execute arbitary SQL
**Supports noop?** false
#### Parameters
##### `database`
Data type: `Optional[String[1]]`
Database to connect to
##### `host`
Data type: `Optional[String[1]]`
Hostname to connect to
##### `password`
Data type: `Optional[String[1]]`
The password
##### `port`
Data type: `Optional[String[1]]`
The port
##### `sql`
Data type: `String[1]`
The SQL you want to execute
##### `user`
Data type: `Optional[String[1]]`
The user
|