Re: PostgreSQL for VAX on NetBSD/OpenBSD

From: Greg Stark <stark(at)mit(dot)edu>
To: David Brownlee <abs(at)absd(dot)org>
Cc: John Klos <john(at)ziaspace(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, port-vax List <port-vax(at)netbsd(dot)org>, vax(at)openbsd(dot)org, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostgreSQL for VAX on NetBSD/OpenBSD
Date: 2015-08-20 15:32:19
Message-ID: CAM-w4HMuERkb1D_q=r6_=47YZe+h3-CoOpY6_umdMKrnEpu7UQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 20, 2015 at 4:13 PM, David Brownlee <abs(at)absd(dot)org> wrote:
>> 2) The initdb problem is actually not our fault. It looks like a
>> NetBSD kernel bug when allocating large shared memory blocks on a
>> machine without lots of memory. There's not much initdb can do with a
>> kernel panic...
>
> That should definitely be fixed...

cf
http://mail-index.netbsd.org/port-vax/2015/08/19/msg002524.html
http://comments.gmane.org/gmane.os.netbsd.ports.vax/5773

It's possible it's a simh bug it smells more like a simple overflow to me.

>> BSD still has the problem of kern.maxfiles defaulting
>> to a value low enough that even two connections causes the regression
>> tests to run out of file descriptors. That's documented and it would
>> be a right pain for initdb to detect that case.
>
> Is initdb calling ulimit() to check/set open files? Its probably worth
> it as a sanity check if nothing else.

Yup, we do that.

> I think the VAX default open_max is 128. The 'bigger' ports have a
> default of 1024, and I think they should probably all be updated to
> that, though that is orthogonal to a ulimit() check.

That's the problem. initdb tests how many connections can start up
when writing the default config. But we assume that each process can
use up to the rlimit file descriptors without running into a
system-wide limit. Raising it to 1024 lets me get two processes
running which is how I'm running them currently.

Also I forgot to mention, I also have to raise the stack limit with
ulimit. The default is so small that Postgres calculates the maximum
safe value for its max_stack_depth config is 0.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2015-08-20 15:42:21 Re: PostgreSQL for VAX on NetBSD/OpenBSD
Previous Message Simon Riggs 2015-08-20 15:15:59 Re: Using quicksort for every external sort run