X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id D57069F95E3 for ; Mon, 17 Jul 2006 22:00:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 85652-05 for ; Mon, 17 Jul 2006 22:00:44 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by postgresql.org (Postfix) with ESMTP id 655049F94F3 for ; Mon, 17 Jul 2006 22:00:45 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id m3so1998495ugc for ; Mon, 17 Jul 2006 18:00:42 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=R2/pqJvMvO38Rfl8JlLdgXY2XwYYUsiDiqVVOTH7VkG2PgG0fveMizkpyaYsihgwRepS5w5Qt5BEFSI8QM3y+jPsiUpc0An9WynhxK+agSzQkwt9E6Smh/VWd1LYOVeDf+0PH/+X0sy8MYXoaIgmU3KucjEduhNZ3qJPinLlCB4= Received: by 10.66.240.12 with SMTP id n12mr3038604ugh; Mon, 17 Jul 2006 18:00:41 -0700 (PDT) Received: by 10.66.241.4 with HTTP; Mon, 17 Jul 2006 18:00:41 -0700 (PDT) Message-ID: <1c66bda80607171800r2b372148q4b4e1b6e4b83af42@mail.gmail.com> Date: Tue, 18 Jul 2006 13:00:41 +1200 From: adey To: "Scott Marlowe" Subject: Re: Recycle error logs Cc: "pgsql-admin@postgresql.org" , postgresql-l In-Reply-To: <1153149797.2744.49.camel@state.g2switchworks.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_92009_26322520.1153184441513" References: <1c66bda80607150037j3c127a32tcdade264bc3f583e@mail.gmail.com> <1153149797.2744.49.camel@state.g2switchworks.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/150 X-Sequence-Number: 22396 ------=_Part_92009_26322520.1153184441513 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Many thanks to all of you that helped with this. On 7/18/06, Scott Marlowe wrote: > > On Sat, 2006-07-15 at 02:37, adey wrote: > > Please advise if there is a way to start a fresh Postgresql error / > > output log at regular intervals? > > We are tuning a "new toproduction" system, so I have all the SQL > > logged, but the file gets too big and cumbersome, so I'd like to start > > a new one each morning without restarting Postgres. > > As mentioned previously, it's built into 8.0 and up. If you're stuck on > a version before that, you can use apache's log rotator to do the job. > > Something like this: > > pg_ctl start | /usr/sbin/rotatelogs /logs/pgsql 86400 > ------=_Part_92009_26322520.1153184441513 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Many thanks to all of you that helped with this.

On 7/18/06, Scott Marlowe <smarlowe@g2switchworks.com> wrote:
On Sat, 2006-07-15 at 02:37, adey wrote:
> Please advise if there is a way to start a fresh Postgresql error /
> output log at regular intervals?
> We are tuning a "new toproduction" system, so I have all the SQL
> logged, but the file gets too big and cumbersome, so I'd like to start
> a new one each morning without restarting Postgres.

As mentioned previously, it's built into 8.0 and up.  If you're stuck on
a version before that, you can use apache's log rotator to do the job.

Something like this:

pg_ctl start | /usr/sbin/rotatelogs /logs/pgsql 86400

------=_Part_92009_26322520.1153184441513--