You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
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 postgres.conf,sample instead of the actual specified configuration the applied setting is actually hugepages = try during initdb.
In these case the initdb phase will attempt to allocate hugepages which are available in the OS, but it will be denied access by Kubernetes and fail.
To Reproduce
Run a DB with no hugepages resources assigned on a OS with hugepages and with hugepages = off set in postgres conf.
Expected behavior
When hugepages are disabled they should not be used, during initdb or otherwise. The inability to specify hugepages forces all DBs to use hugepages on any system where they are enabled, even if the hugepages are intended for other applications and not available to the DB Pods.
Additional context
Issue has persisted for some time and the implementation goes against the spirit of the configuration options provided. Exceedingly awkward workaround such as #1393 (comment) are not suitable for ongoing long-term usage.
The text was updated successfully, but these errors were encountered:
This is outside of Patroni scope.
The initdb doesn't provide a way to disable huge pages.
Editing the sample.conf isn't an option either, Patroni simply doesn't have permissions for that.
Describe the bug
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
postgres.conf,sample
instead of the actual specified configuration the applied setting is actuallyhugepages = try
during initdb.In these case the initdb phase will attempt to allocate hugepages which are available in the OS, but it will be denied access by Kubernetes and fail.
To Reproduce
Run a DB with no hugepages resources assigned on a OS with hugepages and with
hugepages = off
set in postgres conf.Expected behavior
When hugepages are disabled they should not be used, during initdb or otherwise. The inability to specify hugepages forces all DBs to use hugepages on any system where they are enabled, even if the hugepages are intended for other applications and not available to the DB Pods.
Additional context
Issue has persisted for some time and the implementation goes against the spirit of the configuration options provided. Exceedingly awkward workaround such as #1393 (comment) are not suitable for ongoing long-term usage.
The text was updated successfully, but these errors were encountered: