From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pallav Kalva <pkalva@deg.cc>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Postgres Log rotation not working in 8.0.2
Date: Tue, 19 Apr 2005 10:46:46 -0400
Message-ID: <21521.1113922006@sss.pgh.pa.us> (raw)
In-Reply-To: <42651675.4020107@deg.cc>
References: <4264097D.7090808@deg.cc>
<25685.1113857543@sss.pgh.pa.us>
<42642131.60603@deg.cc>
<26045.1113859817@sss.pgh.pa.us>
<42650AC4.3010902@deg.cc>
<21270.1113920596@sss.pgh.pa.us>
<42651675.4020107@deg.cc>
Pallav Kalva <pkalva@deg.cc> writes:
> I am sorry for the confusion, what i meant was the oldest entry on the
> log file was on last monday and most recent was this morning and the
> file didnt rotate yet.
Looking at the code, it will have decided to append not truncate because
%U hadn't changed from the preceding value:
* Decide whether to overwrite or append. We can overwrite if (a)
* Log_truncate_on_rotation is set, (b) the rotation was triggered by
* elapsed time and not something else, and (c) the computed file name
* is different from what we were previously logging into.
There's also a funny involved in the first rotation after startup,
although in your situation case (c) would've prevented overwrite anyway:
* Note: during the first rotation after forking off from the postmaster,
* last_file_name will be NULL. (We don't bother to set it in the
* postmaster because it ain't gonna work in the EXEC_BACKEND case.)
* So we will always append in that situation, even though truncating
* would usually be safe.
So my advice remains "wait till this Thursday before complaining".
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, pkalva@deg.cc
Subject: Re: Postgres Log rotation not working in 8.0.2
In-Reply-To: <21521.1113922006@sss.pgh.pa.us>
References: <4264097D.7090808@deg.cc> <25685.1113857543@sss.pgh.pa.us> <42642131.60603@deg.cc> <26045.1113859817@sss.pgh.pa.us> <42650AC4.3010902@deg.cc> <21270.1113920596@sss.pgh.pa.us> <42651675.4020107@deg.cc> <21521.1113922006@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox