Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X9KwB-00085B-JP for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Jul 2014 21:15:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X9KwA-0001Ma-Ux for pgsql-bugs@arkaria.postgresql.org; Mon, 21 Jul 2014 21:15:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X9Kw9-0001ML-Tz for pgsql-bugs@postgresql.org; Mon, 21 Jul 2014 21:15:57 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1X9Kw4-0004nN-Qp for pgsql-bugs@postgresql.org; Mon, 21 Jul 2014 21:15:56 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1X9Kw1-0003qX-59 for pgsql-bugs@postgresql.org; Mon, 21 Jul 2014 14:15:49 -0700 Date: Mon, 21 Jul 2014 14:15:49 -0700 (PDT) From: David G Johnston To: pgsql-bugs@postgresql.org Message-ID: <1405977349153-5812283.post@n5.nabble.com> In-Reply-To: <24902.1405974941@sss.pgh.pa.us> References: <20140721194918.27765.11913@wrigleys.postgresql.org> <24902.1405974941@sss.pgh.pa.us> Subject: Re: BUG #11014: Postgres can be put into an error state by setting invalid timezone. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.8 (/) 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 Tom Lane-2 wrote > dgillis@ > 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? This does seem kind of a harsh for a mis-understanding that one cannot specify a hours offset as a valid timezone identifier. ISTM the OP was trying to set the timezone to EDT by specifying a -04 hours and 00 minutes offset (- 04 00 = -0400 )...a 4-digit input like this shouldn't be considered a -400 hour GMT offset... David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-11014-Postgres-can-be-put-into-an-error-state-by-setting-invalid-timezone-tp5812271p5812283.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs