From Singh.Inpreet@netsity.com Mon Apr 11 05:20:07 2005 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A69E7534EA for ; Mon, 11 Apr 2005 02:20:07 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15635-05 for ; Mon, 11 Apr 2005 05:20:06 +0000 (GMT) Received: from mail.netsity.com (unknown [61.246.180.169]) by svr1.postgresql.org (Postfix) with ESMTP id 65A9E5349C for ; Mon, 11 Apr 2005 02:19:58 -0300 (ADT) Received: by mail.netsity.com with Internet Mail Service (5.5.2653.19) id <2LDNZFN8>; Mon, 11 Apr 2005 10:50:07 +0530 Received: from ISINGH ([192.168.103.60]) by mail.netsity.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 2LDNZFN7; Mon, 11 Apr 2005 10:50:01 +0530 From: Inpreet Singh To: pgsql-admin@postgresql.org Message-ID: <00e901c53e56$1c79efb0$3c67a8c0@netsity.com> Subject: Log File Maintainance Date: Mon, 11 Apr 2005 10:50:01 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00E6_01C53E84.361F18E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.184 tagged_above=0 required=5 tests=AWL, HTML_50_60, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200504/146 X-Sequence-Number: 17159 This is a multi-part message in MIME format. ------=_NextPart_000_00E6_01C53E84.361F18E0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hello, =20 I am working on live server where we have installed postgres database = as our back end. But now the problem is due to continues work on postgres, size of log files has become problem for us. And the partition where = our postgres exists is full. Postmaster is not working now. I tried to rotate log file by adding lines in postgresql.conf **************************************************** syslog =3D 2 # range 0-2 syslog_facility =3D 'LOCAL0' syslog_ident =3D 'postgres' ******************************** But it doesn't working. Is there anything else I had to due in this respect. I think I am missing some point. =20 Also I had written rotate script and save it at location :/etc/logrotate.d ****************************************************** /usr/local/pgsql/data/serverlog { weekly notifempty rotate 2 create /bin/kill -HUP `cat /usr/local/pgsql/data/postmaster.pid 2> /dev/null` 2> /dev/null || true endscript } *************************************************** But when I am executing following command it is flagging error ************************************************** [root@iemstesting logrotate.d]# logrotate -f -v postgres reading config file postgres reading config info for /usr/local/pgsql/data/logfile =20 error: postgres:6 unexpected log filename ************************************************* =20 Please guide me thru............... Inpreet Singh =20 ------=_NextPart_000_00E6_01C53E84.361F18E0 Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Hello,
 
I am working on live server where we = have=20 installed postgres database as our back end. But now the problem is due = to=20 continues work on postgres, size of log files has become problem = for us.=20 And the partition where our postgres exists is full. Postmaster is not = working=20 now. I tried to rotate log file by adding lines in = postgresql.conf
****************************************************
syslog =3D=20 2            = ;         =20 # range 0-2
syslog_facility =3D 'LOCAL0'
syslog_ident =3D=20 'postgres'
********************************
But it doesn't working. Is there = anything else I=20 had to due in this respect. I think I am missing some = point.
 
Also I had written rotate script and = save it at=20 location :/etc/logrotate.d
******************************************************
/usr/local/pgsql/data/serverlog
{
    = ;   =20 weekly
       =20 notifempty
        rotate=20 2
       =20 create
        /bin/kill -HUP = `cat=20 /usr/local/pgsql/data/postmaster.pid 2> /dev/null` 2> /dev/null = ||=20 true
        = endscript
}
***************************************************
But when I am executing following = command it is=20 flagging error
**************************************************
=
[root@iemstesting logrotate.d]# = logrotate -f -v=20 postgres
reading config file postgres
reading config info for=20 /usr/local/pgsql/data/logfile
 
error: postgres:6 unexpected log=20 filename
*************************************************
 
Please guide me = thru...............
Inpreet Singh
 
------=_NextPart_000_00E6_01C53E84.361F18E0-- From smarlowe@g2switchworks.com Tue Apr 12 13:50:29 2005 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 41E04534C7 for ; Tue, 12 Apr 2005 10:50:29 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95016-06 for ; Tue, 12 Apr 2005 13:50:26 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 1930B534C8 for ; Tue, 12 Apr 2005 10:50:25 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 12 Apr 2005 08:50:27 -0500 Subject: Re: Log File Maintainance From: Scott Marlowe To: Inpreet Singh Cc: pgsql-admin@postgresql.org In-Reply-To: <00e901c53e56$1c79efb0$3c67a8c0@netsity.com> References: <00e901c53e56$1c79efb0$3c67a8c0@netsity.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1113313827.20921.111.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Tue, 12 Apr 2005 08:50:27 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/152 X-Sequence-Number: 17165 On Mon, 2005-04-11 at 00:20, Inpreet Singh wrote: > Hello, > > I am working on live server where we have installed postgres database > as our back end. But now the problem is due to continues work on > postgres, size of log files has become problem for us. And the > partition where our postgres exists is full. I use apache's log rotator and start the server in rc.local: su - postgres -c 'pg_ctl start | /usr/sbin/rotatelogs $PGDATA/logs/pgsql 86400 2>1& &' From smarlowe@g2switchworks.com Tue Apr 12 13:51:56 2005 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F021453467 for ; Tue, 12 Apr 2005 10:51:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 96828-02 for ; Tue, 12 Apr 2005 13:51:53 +0000 (GMT) Received: from koolancexeon.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by svr1.postgresql.org (Postfix) with ESMTP id 7B5D0534B1 for ; Tue, 12 Apr 2005 10:51:53 -0300 (ADT) Received: mail.g2switchworks.com 10.10.1.8 from 10.10.1.37 10.10.1.37 via HTTP with MS-WebStorage 6.5.6944 Received: from state.g2switchworks.com by mail.g2switchworks.com; 12 Apr 2005 08:51:56 -0500 Subject: Re: Log File Maintainance From: Scott Marlowe To: Inpreet Singh Cc: pgsql-admin@postgresql.org In-Reply-To: <00e901c53e56$1c79efb0$3c67a8c0@netsity.com> References: <00e901c53e56$1c79efb0$3c67a8c0@netsity.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1113313916.20921.113.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Tue, 12 Apr 2005 08:51:56 -0500 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/153 X-Sequence-Number: 17166 A followup, there was a type in my last post, shoulda been: su - postgres -c 'pg_ctl start | /usr/sbin/rotatelogs $PGDATA/logs/pgsql 86400 2>&1 &' Note that change in the 2>&1...