From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Server crash with older tzload library |
Date: | 2010-03-12 18:57:02 |
Message-ID: | 11500.1268420222@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2010-03-12 18:59:27 | Re: Dyamic updates of NEW with pl/pgsql |
Previous Message | strk | 2010-03-12 18:51:53 | Re: Dyamic updates of NEW with pl/pgsql |