Re: Server crash with older tzload library

Поиск
Список
Период
Сортировка
От Jeevan Chalke
Тема Re: Server crash with older tzload library
Дата
Msg-id be46a4f31003110302o5f3c4252v79f829976d26b37f@mail.gmail.com
обсуждение исходный текст
Ответ на Server crash with older tzload library  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Список pgsql-hackers
Oops...
Forgot to attach the patch.

Attached here

Thanks

On Thu, Mar 11, 2010 at 4:21 PM, Jeevan Chalke <jeevan.chalke@enterprisedb.com> wrote:
Hi Tom,

While setting timezone using SET command (say GMT+3:30), postgres sometimes crashes randomly.
After debugging into the code, it is observed that if tzload() call fails in pg_tzset() for whatever reason, the returned value of the function then have garbage values for state variable. And this will assigned to session_timezone in assign_timezone() function later.

Now as session_timezone.state variable has garbage values, it is causing a server crash further. Unfortunately it is happening with few garbage values and not crashing the server always.

Here are the two statements used:

SET TimeZone = 'GMT+3:30';
SELECT '1969-12-31 20:30:00'::timestamptz;

After, initializing tzstate variable to zero in pg_tzset() function, server crash didn't come up again.

The upstream zoneinfo project just released a new tzcode version, 2010c. After syncing the code to this version does not lead to server crash. The new release is now initializing the tzstate variable with zeros to avoid any garbage values.

PFA, patch which will bring us up-to date to 2010c.

Note: This behavior was observed on Windows machine.

Thanks

--
Jeevan B Chalke
Software Engineer, R&D
EnterpriseDB Corporation
The Enterprise Postgres Company

Phone: +91 20 30589500

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.



--
Jeevan B Chalke
Software Engineer, R&D
EnterpriseDB Corporation
The Enterprise Postgres Company

Phone: +91 20 30589500

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeevan Chalke
Дата:
Сообщение: Server crash with older tzload library
Следующее
От: Dave Page
Дата:
Сообщение: Re: Server crash with older tzload library