Re: Server crash with older tzload library

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Server crash with older tzload library
Дата
Msg-id 11500.1268420222@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Server crash with older tzload library  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Список pgsql-hackers
Jeevan Chalke <jeevan.chalke@enterprisedb.com> writes:
> In summary, following are the steps to re-produce:
>  - Add above three lines at the beginning of the pg_tzset() function
>  - make install
>  - mv install/share/postgresql/timezone/posixrules
> install/share/postgresql/timezoneposixrules_a  (or remove it)
>  - start the server
>  - run these two statements on psql prompt
>    + SET TimeZone = 'GMT+3:30';
>    + SELECT '1969-12-31 20:30:00'::timestamptz;

> BTW, after your commit, tzload() function now sets goback and goahead
> variable to FALSE which fixes the server crash. MemSet in 2010c is just
> doing it explicitly before calling tzload though.

Mph.  I still can't reproduce a crash even after doing all that and
reverting the goback/goahead change.  However, it seems to me that that
last indicates that this is the same problem discussed on the upstream
tz mailing list in early February, and their fix was to move the
goback/goahead initialization, ie they fixed it between 2010a and 2010c.
So I think we're good (except that this is another reason why we'd be
well advised to back-port tzcode2010c into our older branches).

If we were to insert a memset I think that pg_tzset is the wrong place
for it anyway.  If tzload or tzparse returns 0, then pg_tzset is entitled
to assume that those functions have set up valid tzstate structure
contents, so it should be on their head to zero the struct if that were
needed.  This was in fact proposed upstream (cf ado's message of 16 Feb
2010 17:33:28) but they eventually chose to just clear the
goback/goahead fields there.  I feel no need to diverge from their
solution.
        regards, tom lane


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

Предыдущее
От: strk
Дата:
Сообщение: Re: Dyamic updates of NEW with pl/pgsql
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Dyamic updates of NEW with pl/pgsql