Re: initdb profiles

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, Andrew Dunstan <andrew(at)dunslane(dot)net>, Josh Berkus <josh(at)agliodbs(dot)com>, aly(dot)dharshi(at)telus(dot)net, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: initdb profiles
Date: 2005-09-10 16:54:54
Message-ID: 18873.1126371294@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> On Thursday 08 September 2005 13:16, Andrew Dunstan wrote:
>> Initdb already
>> has adaptive rules - look at the source - and Tom suggests adding
>> another set for max_fsm_pages. All I'm doing is to suggest that we need
>> to tweak those.

> I'm curious how this could work... istm its fairly hard to predict a
> reasonable value for max_fsm_pages before you ever create a single database
> in your cluster... I could perhaps see this as becoming self tuning with an
> integrated autovacuum, where autovacuum stores the values needed for this and
> max_fsm_relations so that upon any restart these values get automatically
> updated to a reasonable number. Even more ideal would be to not have them
> require restart at all, but thats yet another level of magic...

It'd be nice to get out from under the fixed-size-shmem restriction, but
I don't know any very portable way to do that. In the meantime, trying
to automatically change the size parameters as above seems a tad
dangerous. What if they get updated to values that prevent the
postmaster from starting because it exceeds SHMMAX? Failing during
initdb is one thing, but not coming back after a restart is bad.

The thought behind my suggestion was that the current max_fsm_pages
default of 20000 pages is enough to track free space in a database of
maybe a few hundred megabytes. The other defaults are sized
appropriately for machines with about that much in main memory. This
doesn't seem to add up :-(. The default max_fsm_pages probably should
be about ten times bigger just to bring it in balance with the other
defaults ... after that we could talk about increasing the defaults
across-the-board.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2005-09-10 17:59:38 Re: FAQ/HTML standard?
Previous Message Andrew Dunstan 2005-09-10 16:10:19 FAQ/HTML standard?