From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Florian Litot <flitot(at)besancon(dot)sema(dot)slb(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: log file? |
Date: | 2002-11-05 13:17:04 |
Message-ID: | 200211051317.04395.dev@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Rison, Stuart | 2002-11-05 13:33:32 | Copying a rowtype variable. |
Previous Message | Christoph Dalitz | 2002-11-05 13:09:33 | Re: executing delete in a case statement? |