pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedLog File Maintainance
3+ messages / 2 participants
[nested] [flat]
* Log File Maintainance
@ 2005-04-11 05:20 Inpreet Singh <Singh.Inpreet@netsity.com>
0 siblings, 2 replies; 3+ messages in thread
From: Inpreet Singh @ 2005-04-11 05:20 UTC (permalink / raw)
To: pgsql-admin
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. Postmaster is not working now. I tried to
rotate log file by adding lines in postgresql.conf
****************************************************
syslog = 2 # range 0-2
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'
********************************
But it doesn't working. Is there anything else I had to due in this
respect. I think I am missing some point.
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
error: postgres:6 unexpected log filename
*************************************************
Please guide me thru...............
Inpreet Singh
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Log File Maintainance
@ 2005-04-12 13:50 Scott Marlowe <smarlowe@g2switchworks.com>
parent: Inpreet Singh <Singh.Inpreet@netsity.com>
1 sibling, 0 replies; 3+ messages in thread
From: Scott Marlowe @ 2005-04-12 13:50 UTC (permalink / raw)
To: Inpreet Singh <Singh.Inpreet@netsity.com>; +Cc: pgsql-admin
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& &'
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Log File Maintainance
@ 2005-04-12 13:51 Scott Marlowe <smarlowe@g2switchworks.com>
parent: Inpreet Singh <Singh.Inpreet@netsity.com>
1 sibling, 0 replies; 3+ messages in thread
From: Scott Marlowe @ 2005-04-12 13:51 UTC (permalink / raw)
To: Inpreet Singh <Singh.Inpreet@netsity.com>; +Cc: pgsql-admin
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...
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-04-12 13:51 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-11 05:20 Log File Maintainance Inpreet Singh <Singh.Inpreet@netsity.com>
2005-04-12 13:50 ` Scott Marlowe <smarlowe@g2switchworks.com>
2005-04-12 13:51 ` Scott Marlowe <smarlowe@g2switchworks.com>
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