Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X9KJk-00063W-Uk for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Jul 2014 20:36:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X9KJk-0001RM-6t for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Jul 2014 20:36:16 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X9KJj-0001Qj-6P for pgsql-bugs@postgresql.org; Mon, 21 Jul 2014 20:36:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X9KJb-0007D0-Jl for pgsql-bugs@postgresql.org; Mon, 21 Jul 2014 20:36:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s6LKZfEJ024903; Mon, 21 Jul 2014 16:35:41 -0400 From: Tom Lane To: dgillis@dystillr.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #11014: Postgres can be put into an error state by setting invalid timezone. In-reply-to: <20140721194918.27765.11913@wrigleys.postgresql.org> References: <20140721194918.27765.11913@wrigleys.postgresql.org> Comments: In-reply-to dgillis@dystillr.com message dated "Mon, 21 Jul 2014 19:49:18 -0000" Date: Mon, 21 Jul 2014 16:35:41 -0400 Message-ID: <24902.1405974941@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org dgillis@dystillr.com writes: > postgres=# set timezone='-0400'; > SET > postgres=# > postgres=# show timezone; > TimeZone > ---------- > unknown > (1 row) > postgres=# select now(); > The connection to the server was lost. Attempting reset: Failed. Oh, hm, looks like it didn't occur to us that pg_tzset could reject out-of-range input :-(. Previous versions of PG would allow this, interpreting the GMT offset as 400 hours. In 9.4, the data is fed to the zic library, which thinks that the zone offset shouldn't exceed 1 week (168 hours); and we're not defending against a null result. While it's easy enough to add an error check, I wonder if there's an actual use-case for such a large zone offset? Or were you just playing around? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs