Re: BUG #7814: Rotation of the log is not carried out. - Mailing list pgsql-bugs

From Jeff Janes
Subject Re: BUG #7814: Rotation of the log is not carried out.
Date
Msg-id CAMkU=1xKRgg=3Fj=pz_nJprdkgXg3Rx6X9LwfF75k0Kz8F49Ag@mail.gmail.com
Whole thread Raw
In response to Re: BUG #7814: Rotation of the log is not carried out.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses BUG #7814: Rotation of the log is not carried out.
List pgsql-bugs
On Tuesday, January 22, 2013, Tom Lane wrote:

> Jeff Janes <jeff.janes@gmail.com <javascript:;>> writes:
> > For what it is worth, I can reproduce this on Windows 7, using the
> > 9.2.2 and 9.1.7 windows 64 installers from EDB (i.e.
> >
> http://www.enterprisedb.com/postgresql-922-installers-win64?ls=Crossover&type=Crossover
> ),
> > with completely default installation (EDB changes the default to be
> > logging_collector=on), and using the below to blow up the log files
> > with error messages:
>
> > perl -le 'print "FOO$_;" foreach 1..1e7' | psql
>
> > 9.1.7 rotates the log files in $DATA/pg_log, while 9.2.2 does not
> > rotate based on size.
>
> [ scratches head for awhile... ]  Hm, what you are testing is the
> default rotation parameters, right?  log_rotation_age = 1 day,
> log_rotation_size = 10MB?  So you didn't wait to see what would happen
> at a rotation-age boundary.


Correct, I did not wait.  But from the original reporter's screenshot, it
seemed to be rotating correctly based on time, just not on size.


>  If so, does "pg_ctl reload" kick it into
> rotating once the file is too big?


Yes, triggering a reload (through pgAdmin) does cause it to kick over to a
new log file.

...

>
> So what we need on Windows is for the data transfer thread to notice
> when "Log_RotationSize > 0 && ftell(syslogFile) >= Log_RotationSize",
> and then either signal the control thread to wake up, or do the
> rotation itself.  Probably the former is less risk.
>
> I'm not coding this fix though, since I'm not in a position to test it.
>

If I can follow though on Andrew Dunstan's instructions to get mingw up and
running, I'll take it for a spin.

Cheers,

Jeff

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #7819: missing chunk number 0 for toast value 1235919 in pg_toast_35328
Next
From: georgi-georgiev-pgsql@japannext.co.jp
Date:
Subject: BUG #7822: PGDG packaged postgresql92 binaries do not find their libraries