From: Richard Huxton <dev@archonet.com>
To: Florian Litot <flitot@besancon.sema.slb.com>
To: pgsql-general@postgresql.org
Subject: Re: log file?
Date: Tue, 5 Nov 2002 13:17:04 +0000
Message-ID: <200211051317.04395.dev@archonet.com> (raw)
In-Reply-To: <4.3.2.7.2.20021105134126.0236f100@pop.besancon.tt.slb.com>
References: <4.3.2.7.2.20021105121304.022c5100@pop.besancon.tt.slb.com>
<4.3.2.7.2.20021105134126.0236f100@pop.besancon.tt.slb.com>
On Tuesday 05 Nov 2002 12:48 pm, Florian Litot wrote:
> At 12:47 05/11/02, Richard Huxton wrote:
> >How many files are there in pg_xlog and what dates do they have?
> >What are the WAL settings in your postgresql.conf file?
> >Do you have any clients that have been running a long time?
> i have got 66 files
> i have got a new file to 16 minutes
> wal_files = 64 # range 0-64
> #wal_sync_method = fsync # the default varies across platforms:
> # # fsync, fdatasync, open_sync, or open_datasync
> #wal_debug = 0 # range 0-16
> #commit_delay = 0 # range 0-100000
> #commit_siblings = 5 # range 1-1000
> #checkpoint_segments = 3 # in logfile segments (16MB each), min 1
> #checkpoint_timeout = 300 # in seconds, range 30-3600
> #fsync = true
>
> it's standard
> i make some insertion i make 1 insertion every 2 seconds
I don't think I can explain better than by quoting from the manual (for the
full details see the WAL implementation and configuration sections):
"The number of 16MB segment files will always be at least WAL_FILES + 1, and
will normally not exceed WAL_FILES + MAX(WAL_FILES, CHECKPOINT_SEGMENTS) + 1.
This may be used to estimate space requirements for WAL. Ordinarily, when an
old log segment files are no longer needed, they are recycled (renamed to
become the next sequential future segments). If, due to a short-term peak of
log output rate, there are more than WAL_FILES + MAX(WAL_FILES,
CHECKPOINT_SEGMENTS) + 1 segment files, then unneeded segment files will be
deleted instead of recycled until the system gets back under this limit. (If
this happens on a regular basis, WAL_FILES should be increased to avoid it.
Deleting log segments that will only have to be created again later is
expensive and pointless.) "
Given a wal_files setting of 64 you're always going to have 65 files. Keep an
eye on it and see if the number of files keeps increasing - if not, you don't
have a problem. If you want to reduce the number of files, reduce wal_files.
--
Richard Huxton
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 using the --to and --cc options:
reply via email
To: pgsql-general@postgresql.org
Cc: dev@archonet.com, flitot@besancon.sema.slb.com
Subject: Re: log file?
In-Reply-To: <200211051317.04395.dev@archonet.com>
* 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