From: Tom Lane <tgl@sss.pgh.pa.us>
To: cjwhite@cisco.com
Cc: pgsql-admin@postgresql.org
Subject: Re: Limiting size and number of transaction logs
Date: Fri, 14 Jan 2005 20:35:31 -0500
Message-ID: <27796.1105752931@sss.pgh.pa.us> (raw)
In-Reply-To: <200501150031.j0F0VoRO019354@sj-core-3.cisco.com>
References: <200501150031.j0F0VoRO019354@sj-core-3.cisco.com>
"Chris White (cjwhite)" <cjwhite@cisco.com> writes:
> In the documentation for 7.4 for WAL configuration, I see the following
> statement:
> There will be at least one 16 MB segment file, and will normally not be more
> than 2 * checkpoint_segments + 1 files.
> So if I have 1 checkpoint segment configured, does this mean there will be a
> max of 4 16MB files or 3 16MB files.
Note the word "normally" --- there's no guarantees here. A spike in WAL
output rate could result in more WAL segments than usual. But if you
have checkpoint_segments = 1 and the system never generates more than
16MB of WAL output before the next checkpoint can complete, there'd
probably be only two WAL segments. The formula says three, but what
that actually means is that the checkpoint logic will allow up to three
to exist without trying to get rid of any. I think that with a low
enough output rate, it would flip between two segments without ever
trying to make a third one.
> Is there anyway of reducing this number of files, as I am running on a
> system which is very tight on disk space and doesn't have that much DB
> transaction throughput that needs this number of transaction logs or is
> there a way of making the size smaller?
In 8.0 the segment size can be configured at compile time, but I don't
think I'd risk it in earlier releases.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, cjwhite@cisco.com
Subject: Re: Limiting size and number of transaction logs
In-Reply-To: <27796.1105752931@sss.pgh.pa.us>
References: <200501150031.j0F0VoRO019354@sj-core-3.cisco.com> <27796.1105752931@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox