Re: log file?
От | Richard Huxton |
---|---|
Тема | Re: log file? |
Дата | |
Msg-id | 200211051317.04395.dev@archonet.com обсуждение исходный текст |
Ответ на | Re: log file? (Florian Litot <flitot@besancon.sema.slb.com>) |
Список | 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
В списке pgsql-general по дате отправления: