Received: from server.beierfeld.kabeljournal.de (pD900DDA9.dip.t-dialin.net [217.0.221.169]) by postgresql.org (Postfix) with SMTP id 30DED4760C3 for ; Thu, 4 Apr 2002 05:05:54 -0500 (EST) Received: (qmail 22296 invoked from network); 4 Apr 2002 10:05:47 -0000 Received: from station158.beierfeld.kabeljournal.de (HELO km3.de) (192.168.128.158) by server.beierfeld.kabeljournal.de with SMTP; 4 Apr 2002 10:05:47 -0000 Message-ID: <3CAC2617.DE94CACF@km3.de> Date: Thu, 04 Apr 2002 12:08:23 +0200 From: Andre Schubert X-Mailer: Mozilla 4.77 [de] (X11; U; Linux 2.2.19-6.2.12 i586) X-Accept-Language: en MIME-Version: 1.0 To: Gaetano Mendola Cc: pgsql-admin@postgresql.org Subject: Re: Log rotation References: <009d01c1d689$f5878ed0$5ce8fea9@GMENDOLA2> <3CA93986.C721718E@km3.de> <008e01c1daf0$cd683790$5ce8fea9@GMENDOLA2> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200204/49 X-Sequence-Number: 3938 Gaetano Mendola schrieb: > > "Andre Schubert" wrote: > > You can use multilog on linux. > > Hi, I don't know what's multilog but I resolved my > problem in this way (general suggestions for all): multilog does exactly the same as logrotate, but it is a process itself. we you it this way: su -l postgres -c "/usr/bin/pg_ctl ....' start 2>&1 | /usr/bin/multilog s16777215 n20 '/var/log/psql' &" < /dev/null Everything coming from postgres is piped through multilog and multilog creates logfiles in the directory /var/log/pgsql. Each logfile is 16777215 bytes big, and there are max 20 logfiles. There should be a multilog-rpms somewhere for linux. Hope this also helps. Regards > > #File postgresql.conf > > syslog = 2 > syslog_facility = 'LOCAL0' > syslog_ident = 'postgres' > > #File /etc/logrotate.d/postgres > > /var/log/postgresql.log { > compress > rotate 5 > size=10000k > errors mendola@bigfoot.com > create 0664 postgres postgres > daily > postrotate > /usr/bin/killall -HUP syslogd > endscript > } > > #In File syslog.conf > LOCAL0.* > /var/log/postgresql.log > > Ciao > Gaetano > > -- > #exclude > #include > printf("\t\t\b\b\b\b\b\b");. > printf("\t\t\b\b\b\b\b\b"); > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org