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

From Jeff Janes
Subject BUG #7814: Rotation of the log is not carried out.
Date
Msg-id CAMkU=1wqufGeocpC3=K9daiGAbR2Aw0zLRLX9cpPH_fov2huvw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #7814: Rotation of the log is not carried out.  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: BUG #7814: Rotation of the log is not carried out.
List pgsql-bugs
On Tue, Jan 22, 2013 at 9:29 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> On Tuesday, January 22, 2013, Tom Lane wrote:
>>
>>
>> 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.

The attached patch fixes the problem, tested under mingw.

I've included an elog "JJ logger woke up" in the patch to verify that the wake up is not happening more often than it should.  Obviously this line should not be included in the actual commit--but I thought a tester would like to see how I verified this.

This is my first effort in both Windows and in the Latch code, so committer beware.

It should be applied to 9_2 and to head.

I've not added it to the commit-fest as it is a bug fix.

Cheers,

Jeff
Attachment

pgsql-bugs by date:

Previous
From: Pius Chan
Date:
Subject: Re: BUG #7819: missing chunk number 0 for toast value 1235919 in pg_toast_35328
Next
From: Jeff Janes
Date:
Subject: Re: Re: BUG #7748: "drop owned by" fails with error message: "unrecognized object class: 1262"