From: Tom Lane <tgl@sss.pgh.pa.us>
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.
Date: Mon, 21 Jul 2014 16:35:41 -0400
Message-ID: <24902.1405974941@sss.pgh.pa.us> (raw)
In-Reply-To: <20140721194918.27765.11913@wrigleys.postgresql.org>
References: <20140721194918.27765.11913@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, dgillis@dystillr.com
Subject: Re: BUG #11014: Postgres can be put into an error state by setting invalid timezone.
In-Reply-To: <24902.1405974941@sss.pgh.pa.us>
References: <20140721194918.27765.11913@wrigleys.postgresql.org> <24902.1405974941@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox