Re: Log rotation
От | Manfred Spraul |
---|---|
Тема | Re: Log rotation |
Дата | |
Msg-id | 4054CEE7.8010906@colorfullife.com обсуждение исходный текст |
Ответ на | Re: Log rotation (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: Log rotation
|
Список | pgsql-hackers |
Bruce Momjian wrote: >Which basically shows one fsync, no O_SYNC's, and setting of the flag >only for klog reads. > > Which sysklogd do you look at? The version from RedHat 9 contains this block: > /* > * Crack a configuration file line > */ > > void cfline(line, f) > char *line; > register struct filed *f; > { > register char *p; > [snip] > if (*p == '-') > { > syncfile = 0; > p++; > } else > syncfile = 1; > [snip] > if (syncfile) > f->f_flags |= SYNC_FILE; And the the fsync depends on SYNC_FILE. As documented in man syslog.conf: > You may prefix each entry with the minus ``-'' sign to omit > syncing the > file after every logging. Note that you might lose > information if the > system crashes right behind a write attempt. Nevertheless > this might > give you back some performance, especially if you run programs > that use > logging in a very verbose manner. It's sysklogd-1.4.1rh, I'm not sure what part of it are Redhat specific. -- Manfred
В списке pgsql-hackers по дате отправления: