Re: Segfault when running postgres inside kubernetes with huge pages - Mailing list pgsql-bugs

From Andres Freund
Subject Re: Segfault when running postgres inside kubernetes with huge pages
Date
Msg-id 20231109012809.bwav7izghjroscqk@awork3.anarazel.de
Whole thread Raw
In response to Re: Segfault when running postgres inside kubernetes with huge pages  (Siegfried Kiermayer <sicaine@gmail.com>)
List pgsql-bugs
Hi,

On 2023-11-08 16:03:53 +0100, Siegfried Kiermayer wrote:
> we do run kernel 5.8 and the allocation happens basically at start.
> 
> I would still expect postgres to fail gracefully at this point?
> 
> Is 'throwing an error message' / checking the allocation a performance
> issue? is it in a generic hotpath for allocation?

It's not like we're ignoring an error and just continuing - we're successfully
allocating the memory. Then the kernel sends SIGBUS when accessing the freshly
allocated memory.

We could try to install a SIGBUS handler and erroring out that way. But doing
that correctly and portably is not exactly trivial.

Greetings,

Andres Freund



pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: ALTER TABLE results in "could not find cast from 3904 to 3831"
Next
From: Richard Guo
Date:
Subject: Re: BUG #18187: Unexpected error: "variable not found in subplan target lists" triggered by JOIN