Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default

From: Kris Jurka <books(at)ejurka(dot)com>
To: Reece Hart <reece(at)harts(dot)net>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default
Date: 2007-12-06 05:54:58
Message-ID: Pine.BSO.4.64.0712060047500.15777@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, 5 Dec 2007, Reece Hart wrote:

> On Wed, 2007-12-05 at 23:20 -0500, Kris Jurka wrote:
>> You need to consider the units. guc.c is in "number of pages", while
>> postgresql.conf is in kB. Since the page size is 8192, these are
>> equivalent.
>
>
> I did consider that, but I'm not certain that it's that simple. Here's
> why:

Actually what I said earlier was completely bogus, please ignore. I just
looked at the two numbers and essentially made up an answer (even though
that answer was off by a factor of 10). Here's something hopefully more
useful...

max_fsm_pages for the initial postgresql.conf is determined at initdb time
as it depends on the shared_buffers settings it picks for the machine:

src/bin/initdb/initdb.c says:

#define FSM_FOR_BUFS(nbuffers) ((nbuffers) > 1000 ? 50 * (nbuffers) :
20000)

so the actual default at initdb time can be set as high as nbuffers * 50,
where the max shared_buffers is 4096. So the default max_fsm_pages for a
beefier machine will be 204800 which is what you will find in
postgresql.conf.sample.

The fact that you have a commented out value in your postgresql.conf does
not mean it is the default. I'd guess someone set that themself. Try
initdbing a fresh data dir and seeing what the actual default is.

Kris Jurka

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Craig 2007-12-06 12:21:38 BUG #3802: cant install
Previous Message Reece Hart 2007-12-06 05:30:26 Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default