Re: WAL/PITR additional items - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WAL/PITR additional items
Date
Msg-id 10633.1114052625@sss.pgh.pa.us
Whole thread Raw
In response to Re: WAL/PITR additional items  (Gavin Sherry <swm@linuxworld.com.au>)
List pgsql-hackers
Gavin Sherry <swm@linuxworld.com.au> writes:
> I guess I was recalling this part of the earlier thread:
> http://archives.postgresql.org/pgsql-hackers/2004-07/msg01088.php

Mmm.  The question really is whether PreallocXlogFiles does anything
useful at all anymore.  It once would allocate multiple segments but
Bruce took out that parameter on the grounds that it was useless...
and I think the functionality that's left may be useless too.  The
code that *really* creates forward log segments these days is the
logic that recycles old log segments when we are done with 'em.
Once you reach a steady state, each checkpoint will cause about
checkpoint_segments forward xlog segments to come into being.
That's way more than what PreallocXlogFiles will ever do, and at
least in steady state it's sufficient.

Maybe what we need is for PreallocXlogFiles to make sure there
are checkpoint_segments forward segments, not only one.  Given
that functionality, running it only during checkpoints would
be sufficient.  (It'd probably be sufficient to run it only
at startup and when checkpoint_segments changes, actually...)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Paul Tillotson
Date:
Subject: Re: Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Install some slightly realistic cost estimation