Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ta8vU-0001c5-Ca for pgsql-bugs@postgresql.org; Sun, 18 Nov 2012 17:45:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ta8vT-0000q6-4M for pgsql-bugs@postgresql.org; Sun, 18 Nov 2012 17:44:59 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qAIHitAH003367; Sun, 18 Nov 2012 12:44:55 -0500 (EST) From: Tom Lane To: Igor cc: Andres Freund , pgsql-bugs@postgresql.org Subject: Re: BUG #7670: BUG #7545: Unresponsive server with error log reporting: "poll() failed: Invalid argument" In-reply-to: References: <20121118162852.GB14145@awork2.anarazel.de> <3078.1353259769@sss.pgh.pa.us> Comments: In-reply-to Igor message dated "Sun, 18 Nov 2012 19:33:38 +0200" Date: Sun, 18 Nov 2012 12:44:55 -0500 Message-ID: <3366.1353260695@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201211/125 X-Sequence-Number: 34683 Igor writes: > 2012/11/18 Tom Lane >> 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