Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default - Mailing list pgsql-bugs

From Kris Jurka
Subject Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default
Date
Msg-id Pine.BSO.4.64.0712060047500.15777@leary.csoft.net
Whole thread Raw
In response to Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default  (Reece Hart <reece@harts.net>)
Responses Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default
List 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

pgsql-bugs by date:

Previous
From: Reece Hart
Date:
Subject: Re: BUG #3801: max_fsm_pages postgresql.conf default != guc.c default
Next
From: "Craig"
Date:
Subject: BUG #3802: cant install