Re: [7.0.2] rotating log files ...

From: Dana Hudes <dhudes(at)hudes(dot)org>
To: Mitch Vincent <mitch(at)venux(dot)net>
Cc: The Hermit Hacker <scrappy(at)hub(dot)org>, pgsql-admin(at)postgresql(dot)org
Subject: Re: [7.0.2] rotating log files ...
Date: 2000-08-28 18:36:21
Message-ID: Pine.LNX.4.21.0008281434410.32307-100000@advsol4.dsl.concentric.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

That won't work in and of itself since the filehandle to the open
file remains. Possibly do that and HUP the owning process.
I've no idea what happens when that particular process gets SIGHUP
(just because I have the source doesn't mean I read it for no reason)

On Mon, 28 Aug 2000, Mitch Vincent wrote:

> Can you move the logfile then touch the original file to create an empty
> one?
>
> *shrug* just an idea :-)
>
> -Mitch
>
> ----- Original Message -----
> From: "The Hermit Hacker" <scrappy(at)hub(dot)org>
> To: <pgsql-admin(at)postgresql(dot)org>
> Sent: Monday, August 28, 2000 10:59 AM
> Subject: [ADMIN] [7.0.2] rotating log files ...
>
>
> >
> > can someone recommend on how to rotate the following log files without
> > having to stop/start the server?
> >
> > postgres 85333 pgsql 1w VREG 13,131084 995 762037
> /pgsql/logs/postmaster.5432.61308
> > postgres 85333 pgsql 2w VREG 13,131084 316501241 762038
> /pgsql/logs/5432.61308
> >
> > its the 316meg one and growing that I'm more interested in doing,
> obviously ...
> >
> > I'm starting my postmaster as:
> >
> > #!/bin/tcsh
> > setenv PORT 5432
> > setenv POSTMASTER /pgsql/bin/postmaster
> > unlimit
> > ${POSTMASTER} -B 384 -N 192 \
> > -o "-F -o /pgsql/logs/${PORT}.$$ -S 32768" \
> > -i -p ${PORT} -D/pgsql/data >&
> /pgsql/logs/postmaster.${PORT}.$$ &
> >
> > where I was hoping that the '-o /pgsql/logs/${PORT}.$$' would create a
> > 'per postgres process' log file, but $$ is taking on the PID of the parent
> > process, not the children ...
> >
> > suggestions?
> >
> > Marc G. Fournier ICQ#7615664 IRC Nick:
> Scrappy
> > Systems Administrator @ hub.org
> > primary: scrappy(at)hub(dot)org secondary:
> scrappy(at){freebsd|postgresql}.org
> >
> >
>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ragnar Kjørstad 2000-08-28 19:23:13 Re: [7.0.2] rotating log files ...
Previous Message Mitch Vincent 2000-08-28 18:36:09 Re: [7.0.2] rotating log files ...