Re: Missing initialization steps in --check and --single modes

2024-12-16 Thread Tom Lane
I wrote: > While comparing bootstrap.c to postmaster.c, I also noticed that > bootstrap mode is failing to call set_stack_base(). That means that > our checks for stack overflow are inoperative in bootstrap mode, > which doesn't seem great. > The same omissions appear in PostgresSingleUserMain, me

Missing initialization steps in --check and --single modes

2024-12-16 Thread Tom Lane
I was experimenting today with running initdb under low-resource situations (per nearby thread about OpenBSD), and I realized that "postgres --check" does not provide an adequate check on whether the specified number of semaphores can be created. That's because it fails to check whether we can sti