Re: Log Rotation

From: SOzcn <selahattinozcnma(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Log Rotation
Date: 2023-12-12 16:25:35
Message-ID: CAJyV5Aa3rJ11kETeDZUXLktjbm0r8nugjYE4yR=iUay58W2hXA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello Tom,
Thanks for the response.
On the top you can see the parameters, I already set the parameters as you
said. But the truncate didn't work for daily.

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 12 Ara 2023 Sal, 19:18 tarihinde şunu yazdı:

> SOzcn <selahattinozcnma(at)gmail(dot)com> writes:
> > I set the parameters as a daily. The set parameters are as follows.
>
> > In this case, the log file is created as
> > "postgresqllogtest-2023-12-12_182351.log" after the 13th day file, the
> logs
> > in the 12th day file need to be truncated.
>
> > Is the expected result correct? Or does PostgreSQL not support deleting,
> > truncating files? I got successful results when I did this process
> hourly.
> > However, I could not get a correct result when I tried it daily log
> > truncate.
>
> If you want log rotation, you need to choose your filename pattern
> so that old log files will be overwritten after a while; or else
> set up some external tool for removing the old ones. Postgres does
> not do anything to keep track of old log files.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2023-12-12 16:48:26 Re: Log Rotation
Previous Message Tom Lane 2023-12-12 16:18:02 Re: Log Rotation