"Joshua D. Drake" <jd@commandprompt.com> writes:
> On Thu, 2008-12-04 at 00:11 +0000, Gregory Stark wrote:
>> "Joshua D. Drake" <jd@commandprompt.com> writes:
>
>> I
>> started to do this for you last week but got side-tracked. Do you have any
>> time for this?
>
> I can do it if you have a script.
>
>> So how big should a minimum postgres install be not including your data?
>> Is 100M reasonable? Should we say Postgres requires 200M? 500? 1G? Whatever
>> number we pick (or allow the user to pick) will determine how large this value
>> ought to be. And incidentally also provide a bound on
>> autovacuum_max_freeze_age as Heikki pointed out on another thread.
>>
>
> I fail to see what any of the above paragraph has to do with
> checkpoint_segments.
Are we all on the same page on what checkpoint_segments does? It's the number
of segments of WAL log postgres will allow to accumulate before it triggers a
checkpoint and trims off any it doesn't need.
That means even if your database is just churning updating the same records
over and over the WAL will grow to this size before Postgres makes any attempt
to trim it (unless it hits checkpoint_timeout but that's a separate tunable).
If you're loading data all your data will go into the heap *and* the wal log
until it hits this size and triggers a checkpoint.
So this is the minimum amount of extra space you need in addition to your data
for a functioning postgres database install not including your data. If you
don't anticipate postgres using this much space and set aside enough space for
it, your database is at risk of randomly stopping and producing errors when it
can't create new log files you told it needs.
It's interesting that this is the *only* parameter we can come up with that
really directly depends on disk space. The tables are obviously going to be as
big as they have to be and there's not much to do about that. If we could
eliminate this parameter it would be a lot nicer.
-- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production
Tuning