BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes
Date
Msg-id 17757-dbdfc1f1c954a6db@postgresql.org
Whole thread Raw
Responses Re: BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17757
Logged by:          David Angel
Email address:      david_sisson@dell.com
PostgreSQL version: 14.5
Operating system:   Linux
Description:

On an OS where hugepages are enabled, if no hugepages resources are assigned
in Kubernetes and the postgres instance is set to hugepages = off in the
config then one would assume that the DB would not use hugepages.
However, because the initdb process uses postgresql.conf.sample or
postgresql.conf.template instead of the actual specified configuration the
applied setting is actually hugepages = try during initdb.
In these cases, the initdb phase will attempt to allocate huge pages that
are available in the OS, but it will be denied access by Kubernetes and
fail.

Here is a PR with a possible fix:
https://github.com/postgres/postgres/pull/114/files

Here are some links for further information
Ours: https://github.com/CrunchyData/postgres-operator/issues/3477

Others with the same having no solution to disable huge pages.
https://github.com/CrunchyData/postgres-operator/issues/3039
https://github.com/CrunchyData/postgres-operator/issues/2258
https://github.com/CrunchyData/postgres-operator/issues/3126
https://github.com/CrunchyData/postgres-operator/issues/3421

Bitnami
https://github.com/bitnami/charts/issues/7901


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #17756: Invalid replica indentity set order in a dump
Next
From: Amit Kapila
Date:
Subject: Re: DROP DATABASE deadlocks with logical replication worker in PG 15.1