Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ta9Gl-0003xf-Rh for pgsql-bugs@postgresql.org; Sun, 18 Nov 2012 18:06:59 +0000 Received: from moutng.kundenserver.de ([212.227.17.9]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ta9Gi-0007r3-Ai for pgsql-bugs@postgresql.org; Sun, 18 Nov 2012 18:06:59 +0000 Received: from anarazel.de (p5DDC7C56.dip.t-dialin.net [93.220.124.86]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MErUc-1TU5Vl3M42-00G8Cz; Sun, 18 Nov 2012 19:06:55 +0100 Received: by anarazel.de (Postfix, from userid 1000) id CB9B21C00E5; Sun, 18 Nov 2012 19:06:54 +0100 (CET) Date: Sun, 18 Nov 2012 19:06:54 +0100 From: Andres Freund To: Tom Lane Cc: Igor , pgsql-bugs@postgresql.org Subject: Re: BUG #7670: BUG #7545: Unresponsive server with error log reporting: "poll() failed: Invalid argument" Message-ID: <20121118180654.GB30822@awork2.anarazel.de> References: <20121118162852.GB14145@awork2.anarazel.de> <3078.1353259769@sss.pgh.pa.us> <3366.1353260695@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3366.1353260695@sss.pgh.pa.us> X-Provags-ID: V02:K0:L3vmPi0//MHa+UINfoRiQrs08j23MC/hD7Xeq5nLx9d WRSdm5+iWVnKZxE84FBbdzQG3BAlcsJHenTM8HhbExBLWhE3dF FYbcClWXjigfO06LdS64WwMnWMMqtV6Eu6zH1Ce2Kc1JD8iAgl Ahy2+ID6AZjZLYJ3v4qtiDg3p7d/rRxdXL79QS+KgybWO6lXFg aB4BwxKCllUPPAsmnoZKcSrkWkc8ES5UrbF1F2Lg9w66Gnfaia lwfDVZTRpPcTdqsXr3EsaBiSyGWN7bu8Kcmi1aJvGtBMu5teTB gijSmLkc7nglqGr3kyei0JYdXD6L8CTdAKKXHcbvra8U+JvaMK dDWQS9+Ok7lzyEE2SXzrPhW6HjzQh4C1R5TUDbVOk X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201211/130 X-Sequence-Number: 34688 On 2012-11-18 12:44:55 -0500, Tom Lane wrote: > 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. Nicely guessed. > 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. In general I have no problem imposing lower limits, but it seems to be a ugly to get errors for an invalid configuration file after a minor version upgrade. While the wal_sender_timeout isn't really likely to be that high I don't think the log_rotation_age one is unlikely to be set to something in the month range, thats not an unreasonable value. I suggest adding an Assert before the (int)timeout cast, but I guess you already plan to do so. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services