pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Lowry <dlowry@bju.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Joshua D.Drake <jd@commandprompt.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: way to turn off epochs in log_filename
Date: Mon, 29 Oct 2007 08:34:50 -0400
Message-ID: <0ED5986E-B518-4F14-ABAA-5D115DF4F25F@bju.edu> (raw)
In-Reply-To: <29409.1193499029@sss.pgh.pa.us>
References: <E11307EB-94DF-4CDD-A89D-0C88A84F2B99@bju.edu>
	<26960.1193434395@sss.pgh.pa.us>
	<20071026144005.3aa6cc29@scratch>
	<27413.1193435100@sss.pgh.pa.us>
	<20071026154202.501e9b75@scratch>
	<0072EC59-9FE8-461D-AD30-5116F19A1BF7@bju.edu>
	<29409.1193499029@sss.pgh.pa.us>


On Oct 27, 2007, at 11:30 AM, Tom Lane wrote:
>> 1. Logrotate moves the old log file to a new name, equivalent to
>> something like this:
>> mv postgresql.log postgresql.log.1
>> In the mean time, PG keeps writing to the same file.
>> 2. Logrotate sends a HUP (as configured in the logrotate conf) to the
>> postmaster process, which causes PG to close the old log file
>> (postgresql.log.1) and open a new one (postgresql.log).
>
>> If I understand correctly, you're saying that this process either
>> won't work or isn't portable. Is that correct?
>
> Specifically, PG does not respond to SIGHUP in the way you are  
> imagining
> above.  The log-file-switch capability is either nonexistent (if no  
> log
> collector process) or built in (if log collector is active) and there
> doesn't seem any value in driving the latter from outside PG.

Thanks for clearing that up. I think I'll just go with a script to  
clean up the files.

David




view thread (9+ messages)

Message-ID: <0ED5986E-B518-4F14-ABAA-5D115DF4F25F@bju.edu>
Permalink:  ../0ED5986E-B518-4F14-ABAA-5D115DF4F25F@bju.edu/
Also on:    postgresql.org/message-id/0ED5986E-B518-4F14-ABAA-5D115DF4F25F@bju.edu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: dlowry@bju.edu, tgl@sss.pgh.pa.us, jd@commandprompt.com
  Subject: Re: way to turn off epochs in log_filename
  In-Reply-To: <0ED5986E-B518-4F14-ABAA-5D115DF4F25F@bju.edu>
  References: <E11307EB-94DF-4CDD-A89D-0C88A84F2B99@bju.edu> <26960.1193434395@sss.pgh.pa.us> <20071026144005.3aa6cc29@scratch> <27413.1193435100@sss.pgh.pa.us> <20071026154202.501e9b75@scratch> <0072EC59-9FE8-461D-AD30-5116F19A1BF7@bju.edu> <29409.1193499029@sss.pgh.pa.us> <0ED5986E-B518-4F14-ABAA-5D115DF4F25F@bju.edu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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