Vadim Mikheev <vadim@krs.ru> writes:
> Tom Lane wrote:
>> Right now, the postmaster will let you set any combination of -B and -N
>> you please. But it seems obvious that there is some minimum number of
>> buffers per backend below which things aren't going to work very well.
>> I wonder whether the postmaster startup code ought to enforce a minimum
>> ratio, say -B at least twice -N ? I have no idea what an appropriate
> ^^^^^^^^^^^^^^
> It's enough for select from single table using index, so it's
> probably good ratio.
I've added a check in postmaster.c to require -B to be at least twice
-N, per this discussion. It also enforces a minimum -B of 16 no matter
how small -N is. I pulled that number out of the air --- anyone have an
idea whether some other number would be better?
The current default values of -B 64, -N 32 are not affected. However,
since the -N default is easily configurable, I wonder whether we should
move the default -B value into config.h as well...
regards, tom lane