OS timezone files support

Lists: pgsql-patches
From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: pgsql-patches(at)postgresql(dot)org
Subject: OS timezone files support
Date: 2007-03-22 16:40:59
Message-ID: 4602B19B.6080208@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


This patch brings possibility to switch from default build-in timezone
to another timezone source - typically to OS timezone location. This
enhancement helps to packagers easy solve integration problem with
systems Timezones.

If --with-tzdir=/usr/share/zoneinfo is specified as ./configure
parameter, postgres will use timezone files from /usr/share/zoneinfo
directory and build-in timezone files will not be installed by make
install command.

It was discussed few weeks ago:

http://archives.postgresql.org/pgsql-hackers/2007-03/msg00784.php

With regards Zdenek

Attachment Content-Type Size
tz.patch text/x-patch 6.4 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: OS timezone files support
Date: 2007-03-22 17:29:42
Message-ID: 17255.1174584582@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> This patch brings possibility to switch from default build-in timezone
> to another timezone source - typically to OS timezone location.

> It was discussed few weeks ago:
> http://archives.postgresql.org/pgsql-hackers/2007-03/msg00784.php

AFAIR, the conclusion of that discussion was we didn't want it.

I certainly don't see the point of the implementation as you have it
--- it adds a great deal of unnecessary infrastructure compared to just
installing a symlink at share/postgresql/timezone.

regards, tom lane


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>, pgsql-patches(at)postgresql(dot)org
Subject: Re: OS timezone files support
Date: 2007-03-22 18:05:07
Message-ID: 4602C553.9020603@hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane wrote:
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>> This patch brings possibility to switch from default build-in timezone
>> to another timezone source - typically to OS timezone location.
>
>> It was discussed few weeks ago:
>> http://archives.postgresql.org/pgsql-hackers/2007-03/msg00784.php
>
> AFAIR, the conclusion of that discussion was we didn't want it.
>
> I certainly don't see the point of the implementation as you have it
> --- it adds a great deal of unnecessary infrastructure compared to just
> installing a symlink at share/postgresql/timezone.

And if you wanted it in the backend instead of a symlink, shouldn't it
at least try to verify that the files in the timezone directory are
compatible before blindly accepting it?

//Magnus


From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: OS timezone files support
Date: 2007-03-22 18:13:24
Message-ID: 4602C744.9020408@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane wrote:
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>> This patch brings possibility to switch from default build-in timezone
>> to another timezone source - typically to OS timezone location.
>
>> It was discussed few weeks ago:
>> http://archives.postgresql.org/pgsql-hackers/2007-03/msg00784.php
>
> AFAIR, the conclusion of that discussion was we didn't want it.

I'm sorry, but I don't think that the thread has clear conclusion.

> I certainly don't see the point of the implementation as you have it
> --- it adds a great deal of unnecessary infrastructure compared to just
> installing a symlink at share/postgresql/timezone.

The point of my solution is that all packagers who interested in use
only configure switch instead of playing with link integration. In this
case, Packager also must cleanup build-in timezones after make install.
This is not only about add one line into spec file.

There is also big risk that new version of package which will delivery
timezones can replace system file zone information and it damages a system.

I discussed it with gatekeepers which are responsible for patch
preparation and they afraid about future problems with link solution
(based on experience with another sw integration).

with regards Zdenek


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: OS timezone files support
Date: 2007-03-22 18:23:03
Message-ID: 20334.1174587783@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
> Tom Lane wrote:
>> I certainly don't see the point of the implementation as you have it
>> --- it adds a great deal of unnecessary infrastructure compared to just
>> installing a symlink at share/postgresql/timezone.

> The point of my solution is that all packagers who interested in use
> only configure switch instead of playing with link integration. In this
> case, Packager also must cleanup build-in timezones after make install.
> This is not only about add one line into spec file.

No, it's two lines (rm -rf, ln -s). It'll take many more lines than
that to do it in the Postgres configure/build system, even using the
simpler symlink approach. And quite aside from the code addition, what
of documentation? How much text will it take to make clear what this
switch is good for and when it's safe to use?

I just don't see the value of supporting this option in our
configuration infrastructure. Anyone who is competent to determine
whether it's a safe thing to use is more than competent to alter the
installation that way for themselves.

regards, tom lane


From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: OS timezone files support
Date: 2007-03-22 18:35:44
Message-ID: 4602CC80.90309@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Magnus Hagander wrote:
> Tom Lane wrote:
>> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>>> This patch brings possibility to switch from default build-in timezone
>>> to another timezone source - typically to OS timezone location.
>>> It was discussed few weeks ago:
>>> http://archives.postgresql.org/pgsql-hackers/2007-03/msg00784.php
>> AFAIR, the conclusion of that discussion was we didn't want it.
>>
>> I certainly don't see the point of the implementation as you have it
>> --- it adds a great deal of unnecessary infrastructure compared to just
>> installing a symlink at share/postgresql/timezone.
>
> And if you wanted it in the backend instead of a symlink, shouldn't it
> at least try to verify that the files in the timezone directory are
> compatible before blindly accepting it?

I think that packager is responsible for verification his integration.
It is same in both cases (configure or link solution). I'm not sure if
it is necessary make check of timezone validity during build time. Build
environment should be different from target system.

If you talk about checking timezone files on runtime, I hope Postgres
verify timezone files every time.

Zdenek


From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: OS timezone files support
Date: 2007-03-23 09:02:50
Message-ID: 460397BA.30508@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Tom Lane wrote:
> Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:
>> Tom Lane wrote:
>>> I certainly don't see the point of the implementation as you have it
>>> --- it adds a great deal of unnecessary infrastructure compared to just
>>> installing a symlink at share/postgresql/timezone.
>
>> The point of my solution is that all packagers who interested in use
>> only configure switch instead of playing with link integration. In this
>> case, Packager also must cleanup build-in timezones after make install.
>> This is not only about add one line into spec file.
>
> No, it's two lines (rm -rf, ln -s). It'll take many more lines than
> that to do it in the Postgres configure/build system, even using the
> simpler symlink approach. And quite aside from the code addition, what
> of documentation? How much text will it take to make clear what this
> switch is good for and when it's safe to use?
>
> I just don't see the value of supporting this option in our
> configuration infrastructure. Anyone who is competent to determine
> whether it's a safe thing to use is more than competent to alter the
> installation that way for themselves.

I thought about it and You are right. It is really better to keep
solution on packagers, than extend infrastructure and give "machine gun"
to everybody :-).

Thanks for your time

Zdenek