Skip site navigation (1) Skip section navigation (2)

Re: log_filename_prefix --> log_filename + strftime()

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>,Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: log_filename_prefix --> log_filename + strftime()
Date: 2004-08-29 09:12:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
Tom Lane wrote:
> Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
>>Tom Lane wrote:
>>>I can see the value of not needing any cron daemon to remove old logs.
>>No other logs on your system to purge?
> The DBA isn't necessarily also root.

Interesting this argument comes from you.. :-)

Tasks like purging old log files is certainly not a job that needs to be 
implemented in the backend; instead, an external database maintenance 
agent should do that.
Such an agent (pgadmin TODO list working title: pgAgent, there was a 
lengthy discussion "Scheduled jobs" starting 2004-05-12), allowing 
scheduled sql scripts, would delete old log files using

select pg_file_unlink(filename)
   from pg_logdir_ls
  where filetime < now() - '8 days'::interval

*if* this functionality isn't corrupted by arbitrary selectable file 
name formatting.


In response to


pgsql-patches by date

Next:From: Andreas PflugDate: 2004-08-29 09:14:54
Subject: Re: log_filename_prefix --> log_filename + strftime()
Previous:From: Dave PageDate: 2004-08-29 08:42:12
Subject: Autovbacuum Win32 service patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group