BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: david_sisson(at)dell(dot)com
Subject: BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes
Date: 2023-01-20 22:48:09
Message-ID: 17757-dbdfc1f1c954a6db@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17757
Logged by: David Angel
Email address: david_sisson(at)dell(dot)com
PostgreSQL version: 14.5
Operating system: Linux

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

Here is a PR with a possible fix:

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.



Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Kapila 2023-01-21 11:36:14 Re: DROP DATABASE deadlocks with logical replication worker in PG 15.1
Previous Message Tom Lane 2023-01-20 19:54:25 Re: BUG #17756: Invalid replica indentity set order in a dump