Mag Gam <magawake(at)gmail(dot)com> writes:
> I am expecting my logs to rotate on a weekly basis. I set the
> log_rotation_size = 1 for a quick result. Basically when a log is
> over 1k it should be rotated, which happens very quickly for me.
> However, file is increasing, and no rotation.
Well, the problem is that you set it up so that sub-daily rotation
doesn't do anything: the filename pattern is 'postgresql-%a.log'
which means that any filename generated on, say, Tuesday is going
to look the same. So the "rotation" action consists of re-opening
the same log file (and appending to it, not truncating it, so that
there's no visible effect).
If you want the thing to change log filenames oftener than once a
day, you need a suitable pattern. There are a couple of examples
of sane combinations of parameters in the docs:
(look under log_truncate_on_rotation). Basically, if you want to
rotate on size, you need the filename pattern to include a component
that is shorter duration than the normal time-driven rotation would
regards, tom lane
In response to
pgsql-novice by date
|Next:||From: Jaromír Kamler||Date: 2005-12-26 19:45:06|
|Previous:||From: Rana Biswas||Date: 2005-12-26 13:55:47|
|Subject: Postgresql 8.1|