Re: Log rotation - Mailing list pgsql-admin

From Andre Schubert
Subject Re: Log rotation
Date
Msg-id 3CAC2617.DE94CACF@km3.de
Whole thread Raw
In response to Log rotation  ("Gaetano Mendola" <mendola@bigfoot.com>)
List pgsql-admin
Gaetano Mendola schrieb:
>
> "Andre Schubert" <andre.schubert@km3.de> 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 <windows>
> #include <CSRSS>
> 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

pgsql-admin by date:

Previous
From: Karel Zak
Date:
Subject: Re: help on to_date conversion please....
Next
From: Felipe Nascimento
Date:
Subject: Re: How to create a user with password