databasepostgresqlubuntuhuge-pages

postgres doesn't connect when I enable huge page


If I enable huge_pages=on in postgresql.conf file, my postgres-14 not connecting If i disable postgres it connects

can anyone help me? My OS is ubuntu 20.04


Solution

  • If you set huge_pages = on, the server won't start unless you define enough hugepages on the operating system. See the documentation:

    huge_pages (enum)

    Controls whether huge pages are requested for the main shared memory area. Valid values are try (the default), on, and off. With huge_pages set to try, the server will try to request huge pages, but fall back to the default if that fails. With on, failure to request huge pages will prevent the server from starting up. With off, huge pages will not be requested.

    [...]

    For more details about using huge pages on Linux, see Section 19.4.5.