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

From: Andres Freund <andres(at)anarazel(dot)de>
To: "Sisson, David" <David(dot)Sisson(at)dell(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes
Date: 2023-01-23 19:55:04
Message-ID: 20230123195504.uvlcd3aytn3jg744@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On 2023-01-23 19:26:09 +0000, Sisson, David wrote:
> I believe something should be done with PostgreSQL because we are configuring huge_pages = off in the standard "postgresql.conf" file.
> huge_pages can be turned on through outside manipulation but it can't be
> turned off.

It's a fault of the environment if mmap(MAP_HUGETLB) causes a SIGBUS. Normally
huge_pages = try is harmless, because it'll just fall back. That source of
SIGBUSes needs to be fixed regardless of anything else - plenty allocators try
to use huge pages for example, so you'll run into problems regardless of
postgres' default.

That said, I'm for allowing to specify options to initdb.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-01-23 19:55:50 Re: BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes
Previous Message Sisson, David 2023-01-23 19:51:14 RE: BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes