PostgreSQL Coredump Caused by Huge Pages
Problem Description
PostgreSQL crashes on start-up with a bus error / coredump. The bootstrap log ends with:
Root Cause
Huge pages are enabled on the host, but the pod has no huge-page resource
allocated, so the container cannot use them. PostgreSQL tries to request huge
pages by default; the kernel sends SIGBUS, which produces the coredump.
Resolution
Disable huge pages for the database. Set the huge_pages parameter to off in
the postgresql custom resource:
Apply the change and let the Operator reconcile. Verify:
Expected output:
On current operand releases, setting the huge_pages parameter is sufficient —
it is applied both at runtime and during database initialization. (Older
guidance that mounted a postgresql.conf.sample ConfigMap per PostgreSQL major
version is no longer required.)