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

Re: Built-in log rotation

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Kris Kiger <kris(at)musicrebellion(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Built-in log rotation
Date: 2007-02-19 15:53:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Kris Kiger wrote:
> Greetings!  I've been doing some research into log rotation software and 
> ran into this, while looking through the postgres site:
> "There is a built-in log rotation program, which you can use by setting 
> the configuration parameter redirect_stderr to true in postgresql.conf."
> My question is, how does it rotate logs?

It closes the old file and opens a new one -- new name, new file
descriptor, so the problem you mention below doesn't exist anymore.

> Does it perform a 
> copy/truncate of the logfile?  I know in older versions of postgres, if 
> you tried to move the log file, and create one with the same name, the 
> server wouldn't actually write to it without a least in 
> linux it wouldn't.

This code is "new" (only two years old).

Alvaro Herrera                      
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

pgsql-admin by date

Next:From: Ray StellDate: 2007-02-19 16:19:37
Subject: log_duration?
Previous:From: Kris KigerDate: 2007-02-19 15:34:40
Subject: Built-in log rotation

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