Re: BUG #7814: Rotation of the log is not carried out.

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tsunezumi <tsunezumi(at)efficlabo(dot)com>, Kevin Grittner <kgrittn(at)mail(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #7814: Rotation of the log is not carried out.
Date: 2013-01-23 05:29:03
Message-ID: CAMkU=1xKRgg=3Fj=pz_nJprdkgXg3Rx6X9LwfF75k0Kz8F49Ag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Tuesday, January 22, 2013, Tom Lane wrote:

> Jeff Janes <jeff(dot)janes(at)gmail(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavan Deolasee 2013-01-23 06:27:39 Re: BUG #7824: documentation bug: Extract DOW
Previous Message Tom Lane 2013-01-23 04:14:46 Re: BUG #7819: missing chunk number 0 for toast value 1235919 in pg_toast_35328

Browse pgsql-hackers by date

  From Date Subject
Next Message Jon Erdman 2013-01-23 05:31:54 Re: My first patch! (to \df output)
Previous Message Phil Sorber 2013-01-23 05:17:39 Re: My first patch! (to \df output)