Re: BUG #7670: BUG #7545: Unresponsive server with error log reporting: "poll() failed: Invalid argument"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Igor <igorya(dot)inscriptio(at)gmail(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7670: BUG #7545: Unresponsive server with error log reporting: "poll() failed: Invalid argument"
Date: 2012-11-18 17:44:55
Message-ID: 3366.1353260695@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Igor <igorya(dot)inscriptio(at)gmail(dot)com> writes:
> 2012/11/18 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
>> I was just about to ask what you have log_rotation_age set to ...

> Was:
> log_rotation_age = 30d

That's the problem then. Internally that gets converted to
milliseconds, which'll overflow at 24-something days. Use a smaller
value.

So the actual bug here is an over-optimistic maximum value for
log_rotation_age in guc.c. After looking through all the callers of
WaitLatch, I think the only other similar issue is for
wal_sender_timeout, which currently is allowed to range up to INT_MAX;
but such values seem pretty useless.

I'm inclined to propose limiting both of these to the equivalent of 15
days. Alternatively we could try to rejigger things to prevent asking
WaitLatch to wait for more than 2^31 msec, but it's not real clear to
me that it's worth the trouble.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2012-11-18 17:45:19 Re: BUG #7670: BUG #7545: Unresponsive server with error log reporting: "poll() failed: Invalid argument"
Previous Message Andres Freund 2012-11-18 17:41:23 Re: BUG #7670: BUG #7545: Unresponsive server with error log reporting: "poll() failed: Invalid argument"