Re: Deleting the pg logs older than 30 days or certain time

From: MichaelDBA <MichaelDBA(at)sqlexec(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Guillaume Lelarge <guillaume(at)lelarge(dot)info>, Nikhil Ingale <niks(dot)bgm(at)gmail(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Deleting the pg logs older than 30 days or certain time
Date: 2023-06-29 13:16:44
Message-ID: 017a8f0f-2a35-297e-764e-5f77a1af4ff3@sqlexec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

example: log_filename = 'postgresql-%a.log'

Tom Lane wrote on 6/29/2023 7:22 AM:
> Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
>> Le jeu. 29 juin 2023 à 09:13, Nikhil Ingale <niks(dot)bgm(at)gmail(dot)com> a écrit :
>>> Can postgresql internal log rotation configuration mechanism delete the
>>> log files older than a specific period of time?
>> No.
> It will work if you choose a filename pattern such that old files are
> overwritten on some cycle. logrotate is a more flexible answer
> of course.
>
> regards, tom lane
>
>

Regards,

Michael Vitale

Michaeldba(at)sqlexec(dot)com <mailto:michaelvitale(at)sqlexec(dot)com>

703-600-9343

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Wetmore, Matthew (CTR) 2023-06-29 17:45:07 Deleting the pg logs older than 30 days or certain time
Previous Message Tom Lane 2023-06-29 11:22:01 Re: Deleting the pg logs older than 30 days or certain time