pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
here does postgres take its timezone information from?
21+ messages / 6 participants
[nested] [flat]

* here does postgres take its timezone information from?
@ 2019-11-05 22:46 Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 22:58 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 2 replies; 21+ messages in thread

From: Chris Withers @ 2019-11-05 22:46 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org

Hi All,

Brazil recently abolished daylight savings time, resulting in updates to 
system timezone information packages.
Does postgres use these? If so, does it need a reload or restart to see 
the updated zone info?

If not, how does postgres store/obtain its timezone zone information and 
how would this be updated?

cheers,

Chris





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
@ 2019-11-05 22:54 ` Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  1 sibling, 1 reply; 21+ messages in thread

From: Adrian Klaver @ 2019-11-05 22:54 UTC (permalink / raw)
  To: Chris Withers <chris@withers.org>; pgsql-general@lists.postgresql.org

On 11/5/19 2:46 PM, Chris Withers wrote:
> Hi All,
> 
> Brazil recently abolished daylight savings time, resulting in updates to 
> system timezone information packages.
> Does postgres use these? If so, does it need a reload or restart to see 
> the updated zone info?
> 
> If not, how does postgres store/obtain its timezone zone information and 
> how would this be updated?

https://www.postgresql.org/about/news/1960/
PostgreSQL 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24, and 12 Beta 3 Released!

"This update also contains tzdata release 2019b for DST law changes in 
Brazil, plus historical corrections for Hong Kong, Italy, and Palestine. 
This update also adds support for zic's new -b slim option to reduce the 
size of the installed zone files, though it is not currently being used 
by PostgreSQL."

> 
> cheers,
> 
> Chris
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
@ 2019-11-05 23:00   ` Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Chris Withers @ 2019-11-05 23:00 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org

On 05/11/2019 22:54, Adrian Klaver wrote:
> On 11/5/19 2:46 PM, Chris Withers wrote:
>> Hi All,
>>
>> Brazil recently abolished daylight savings time, resulting in updates 
>> to system timezone information packages.
>> Does postgres use these? If so, does it need a reload or restart to 
>> see the updated zone info?
>>
>> If not, how does postgres store/obtain its timezone zone information 
>> and how would this be updated?
> 
> https://www.postgresql.org/about/news/1960/
> PostgreSQL 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24, and 12 Beta 3 Released!
> 
> "This update also contains tzdata release 2019b for DST law changes in 
> Brazil, plus historical corrections for Hong Kong, Italy, and Palestine. 
> This update also adds support for zic's new -b slim option to reduce the 
> size of the installed zone files, though it is not currently being used 
> by PostgreSQL."

Hmm. Is there any option to use the system timezone packages?

If not, why not?

Chris





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
@ 2019-11-05 23:02     ` Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Adrian Klaver @ 2019-11-05 23:02 UTC (permalink / raw)
  To: Chris Withers <chris@withers.org>; pgsql-general@lists.postgresql.org

On 11/5/19 3:00 PM, Chris Withers wrote:
> On 05/11/2019 22:54, Adrian Klaver wrote:
>> On 11/5/19 2:46 PM, Chris Withers wrote:
>>> Hi All,
>>>
>>> Brazil recently abolished daylight savings time, resulting in updates 
>>> to system timezone information packages.
>>> Does postgres use these? If so, does it need a reload or restart to 
>>> see the updated zone info?
>>>
>>> If not, how does postgres store/obtain its timezone zone information 
>>> and how would this be updated?
>>
>> https://www.postgresql.org/about/news/1960/
>> PostgreSQL 11.5, 10.10, 9.6.15, 9.5.19, 9.4.24, and 12 Beta 3 Released!
>>
>> "This update also contains tzdata release 2019b for DST law changes in 
>> Brazil, plus historical corrections for Hong Kong, Italy, and 
>> Palestine. This update also adds support for zic's new -b slim option 
>> to reduce the size of the installed zone files, though it is not 
>> currently being used by PostgreSQL."
> 
> Hmm. Is there any option to use the system timezone packages?


https://www.postgresql.org/docs/11/install-procedure.html

--with-system-tzdata=DIRECTORY

> 
> If not, why not?
> 
> Chris


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
@ 2019-11-06 00:18       ` Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 21+ messages in thread

From: Thomas Munro @ 2019-11-06 00:18 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

On Wed, Nov 6, 2019 at 12:02 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> On 11/5/19 3:00 PM, Chris Withers wrote:
> > Hmm. Is there any option to use the system timezone packages?
>
> https://www.postgresql.org/docs/11/install-procedure.html
>
> --with-system-tzdata=DIRECTORY

By the way, you can see if your installation of PostgreSQL was built
to use system-provided tzdata by running the pg_config program that
was installed alongside it.  That could be useful if it was built by a
package maintainer (Debian etc) and you want to see how they
configured it.  You'll see something like CONFIGURE = '...
--with-system-tzdata=/usr/share/... ' if it's using OS vendor tzdata
files.  I hope that most distributions do that*, because otherwise you
could finish up with lots of out-of-sync copies of the tzdata database
inside your database, your JVM, your libc, etc etc, and you want a
single source of truth for that stuff.

Once I was involved in rolling out a last minute DST rule change that
happened in Australia due to politicians and an international sporting
event, and we had to go hunting for copies of tzdata hiding on our
servers that had to agree on when the financial markets were
opening... we found many copies, and ever since then I complain
wherever I see packages shipping their own copies of this stuff...

Assuming you are using system tzdata, your other question was what you
need to do after the tzdata files have been updated.  I suspect that
new PostgreSQL database sessions (processes) will see the new rules,
but existing sessions may continue to see the old rules if they had
loaded them already, because we cache them in per-process memory (see
pg_tzset()).  It would probably be safest to restart the PostgreSQL
cluster.

If you're using PostgreSQL's build-in tzdata, then you'll need to
restart your cluster anyway once you install the version that shipped
with the new tzdata rules, and depending on your package manager, that
might happen automatically when you upgrade.

*It looks like FreeBSD's port uses the copy of tzdata from the
PostgreSQL source tree by default and thus that is what you get if you
install PostgreSQL with "pkg".  That's not a great default IMHO and
should be changed.





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
@ 2019-11-06 01:20         ` Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2019-11-06 01:20 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Thomas Munro <thomas.munro@gmail.com> writes:
> On Wed, Nov 6, 2019 at 12:02 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>> On 11/5/19 3:00 PM, Chris Withers wrote:
>>> Hmm. Is there any option to use the system timezone packages?

>> --with-system-tzdata=DIRECTORY

> I hope that most distributions do that*, because otherwise you
> could finish up with lots of out-of-sync copies of the tzdata database
> inside your database, your JVM, your libc, etc etc, and you want a
> single source of truth for that stuff.

Right.  Our recommendation is to use --with-system-tzdata if you're on
a platform where the vendor updates their copy of tzdata regularly.
The fact that we supply a copy of tzdata at all is really just a fallback
for folks on poorly-supported platforms.  (Naming no names here ...)

> Assuming you are using system tzdata, your other question was what you
> need to do after the tzdata files have been updated.  I suspect that
> new PostgreSQL database sessions (processes) will see the new rules,
> but existing sessions may continue to see the old rules if they had
> loaded them already, because we cache them in per-process memory (see
> pg_tzset()).  It would probably be safest to restart the PostgreSQL
> cluster.

Yeah, I think you need a restart typically.  The postmaster process will
not absorb any update to timezone data it's already loaded, and child
processes will mostly inherit that data via fork().  You might be able
to finagle it by hacks like changing postgresql.conf to a different
timezone name that happens to be equivalent, but on the whole a quick
restart after updating the zone data is the best bet.

(Really, if your active zone's rules have changed, you'd be well advised
to just reboot the whole darn box.  Postgres is *very far* from being
the only daemon that is going to give you issues with this.)

> *It looks like FreeBSD's port uses the copy of tzdata from the
> PostgreSQL source tree by default and thus that is what you get if you
> install PostgreSQL with "pkg".  That's not a great default IMHO and
> should be changed.

Ugh.  Who can we poke there?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-11-06 02:03           ` Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  0 siblings, 1 reply; 21+ messages in thread

From: Thomas Munro @ 2019-11-06 02:03 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; Palle Girgensohn <girgen@pingpong.net>

On Wed, Nov 6, 2019 at 2:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Thomas Munro <thomas.munro@gmail.com> writes:
> > On Wed, Nov 6, 2019 at 12:02 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
> >> On 11/5/19 3:00 PM, Chris Withers wrote:
> >>> Hmm. Is there any option to use the system timezone packages?
>
> >> --with-system-tzdata=DIRECTORY
>
> > I hope that most distributions do that*, because otherwise you
> > could finish up with lots of out-of-sync copies of the tzdata database
> > inside your database, your JVM, your libc, etc etc, and you want a
> > single source of truth for that stuff.
>
> Right.  Our recommendation is to use --with-system-tzdata if you're on
> a platform where the vendor updates their copy of tzdata regularly.
> The fact that we supply a copy of tzdata at all is really just a fallback
> for folks on poorly-supported platforms.  (Naming no names here ...)

Incidentally, that's also why I don't want to give up on libc
collations quite as easily as some, despite their limitations.  It
should be possible to get all the software on your system to agree on
the ordering of two strings and the current time!

> > *It looks like FreeBSD's port uses the copy of tzdata from the
> > PostgreSQL source tree by default and thus that is what you get if you
> > install PostgreSQL with "pkg".  That's not a great default IMHO and
> > should be changed.
>
> Ugh.  Who can we poke there?

Maybe Palle?  (CCed).





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
@ 2019-11-12 14:40             ` Palle Girgensohn <girgen@pingpong.net>
  2019-11-13 00:45               ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 21+ messages in thread

From: Palle Girgensohn @ 2019-11-12 14:40 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@FreeBSD.org>



> 6 nov. 2019 kl. 03:03 skrev Thomas Munro <thomas.munro@gmail.com>:
> 
> On Wed, Nov 6, 2019 at 2:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Thomas Munro <thomas.munro@gmail.com> writes:
>>> On Wed, Nov 6, 2019 at 12:02 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
>>>> On 11/5/19 3:00 PM, Chris Withers wrote:
>>>>> Hmm. Is there any option to use the system timezone packages?
>> 
>>>> --with-system-tzdata=DIRECTORY
>> 
>>> I hope that most distributions do that*, because otherwise you
>>> could finish up with lots of out-of-sync copies of the tzdata database
>>> inside your database, your JVM, your libc, etc etc, and you want a
>>> single source of truth for that stuff.
>> 
>> Right.  Our recommendation is to use --with-system-tzdata if you're on
>> a platform where the vendor updates their copy of tzdata regularly.
>> The fact that we supply a copy of tzdata at all is really just a fallback
>> for folks on poorly-supported platforms.  (Naming no names here ...)
> 
> Incidentally, that's also why I don't want to give up on libc
> collations quite as easily as some, despite their limitations.  It
> should be possible to get all the software on your system to agree on
> the ordering of two strings and the current time!
> 
>>> *It looks like FreeBSD's port uses the copy of tzdata from the
>>> PostgreSQL source tree by default and thus that is what you get if you
>>> install PostgreSQL with "pkg".  That's not a great default IMHO and
>>> should be changed.
>> 
>> Ugh.  Who can we poke there?
> 
> Maybe Palle?  (CCed).


Hi,

The decision to use postgresql's tzdata is quite old. It was based on the assumption that postgres is updated more frequently than the operating system, and that for that reason it was better to use postgresql's tzdata, since it would be more accurate more often. This is probably not true anymore, so I agree it should probably be changed to default=system-tzdata on FreeBSD.

I will commit an upgrade in Thursday, and unless anybody raise their voice against it, I will change the default setting then.

Regards,
Palle








^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
@ 2019-11-13 00:45               ` Thomas Munro <thomas.munro@gmail.com>
  2019-11-13 14:41                 ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 21+ messages in thread

From: Thomas Munro @ 2019-11-13 00:45 UTC (permalink / raw)
  To: Palle Girgensohn <girgen@pingpong.net>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@freebsd.org>

On Wed, Nov 13, 2019 at 3:40 AM Palle Girgensohn <girgen@pingpong.net> wrote:
> The decision to use postgresql's tzdata is quite old. It was based on the assumption that postgres is updated more frequently than the operating system, and that for that reason it was better to use postgresql's tzdata, since it would be more accurate more often. This is probably not true anymore, so I agree it should probably be changed to default=system-tzdata on FreeBSD.
>
> I will commit an upgrade in Thursday, and unless anybody raise their voice against it, I will change the default setting then.

Thanks!

FreeBSD users already have the choice between zoneinfo from base or
the misc/zoneinfo port if for some reason they want to control tzdata
updates separately.  PostgreSQL and FreeBSD both track tzdata closely,
and both pushed a commit for version 2019c into their stable branches
within a couple of weeks of it being released, so I don't foresee any
problem with this change, and staying in sync with libc seems to
outweigh any other concerns IMHO.

https://www.iana.org/time-zones
https://github.com/postgres/postgres/tree/REL_12_STABLE/src/timezone/data
https://github.com/freebsd/freebsd/tree/stable/12/contrib/tzdata





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-13 00:45               ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
@ 2019-11-13 14:41                 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 21+ messages in thread

From: Tom Lane @ 2019-11-13 14:41 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; +Cc: Palle Girgensohn <girgen@pingpong.net>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@freebsd.org>

Thomas Munro <thomas.munro@gmail.com> writes:
> FreeBSD users already have the choice between zoneinfo from base or
> the misc/zoneinfo port if for some reason they want to control tzdata
> updates separately.  PostgreSQL and FreeBSD both track tzdata closely,
> and both pushed a commit for version 2019c into their stable branches
> within a couple of weeks of it being released, so I don't foresee any
> problem with this change, and staying in sync with libc seems to
> outweigh any other concerns IMHO.

Note that the normal situation, on a platform with a well-maintained
tzdata package, is that tzdata acquired via Postgres is going to lag
behind.  That's because we don't ship tzdata updates until our next
quarterly release, while the OS vendor probably has a much more
streamlined process for package updates.

In the case of 2019c, I pushed it into our code while it was still
pretty fresh, because it was just a few days to 12rc1 and I thought
the RC should contain the latest tzdata.  But usually we only bother
to sync from tzdata upstream when a quarterly release is impending.

In theory, it's possible that a tzdata update could break Postgres.
But it'd probably break a lot of other code too.  In practice, the
IANA people are well aware of that hazard, so there is a *long*
delay between when they introduce a new tzcode feature and when
they're willing to start relying on it in tzdata.  We try to stay
fairly current on our copy of tzcode, so that should only be a live
hazard for out-of-support Postgres branches.

(I was reminded of this just the other day when I had occasion
to run the 9.2 regression tests, and they failed because of a
no-longer-valid assumption about Venezuelan time.  I should
rebuild that legacy installation without --with-system-tzdata,
I guess, so that it uses tzdata it's expecting.)

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
@ 2019-11-15 19:38               ` Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-15 20:32                 ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  1 sibling, 1 reply; 21+ messages in thread

From: Tom Lane @ 2019-11-15 19:38 UTC (permalink / raw)
  To: Palle Girgensohn <girgen@pingpong.net>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@FreeBSD.org>

Palle Girgensohn <girgen@pingpong.net> writes:
>> 6 nov. 2019 kl. 03:03 skrev Thomas Munro <thomas.munro@gmail.com>:
>>> *It looks like FreeBSD's port uses the copy of tzdata from the
>>> PostgreSQL source tree by default and thus that is what you get if you
>>> install PostgreSQL with "pkg".  That's not a great default IMHO and
>>> should be changed.

> The decision to use postgresql's tzdata is quite old. It was based on the assumption that postgres is updated more frequently than the operating system, and that for that reason it was better to use postgresql's tzdata, since it would be more accurate more often. This is probably not true anymore, so I agree it should probably be changed to default=system-tzdata on FreeBSD.
> I will commit an upgrade in Thursday, and unless anybody raise their voice against it, I will change the default setting then.

So it seems that that change was not entirely without fallout:

https://www.postgresql.org/message-id/flat/16118-ef1e45e342c52416%40postgresql.org

I don't think this is reason to revert the change, exactly,
but it's a concern.  I wonder why FreeBSD editorializes on
the set of zone names?

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-11-15 20:32                 ` Thomas Munro <thomas.munro@gmail.com>
  2019-11-15 23:35                   ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  0 siblings, 1 reply; 21+ messages in thread

From: Thomas Munro @ 2019-11-15 20:32 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Palle Girgensohn <girgen@pingpong.net>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@freebsd.org>

On Sat, Nov 16, 2019 at 8:38 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Palle Girgensohn <girgen@pingpong.net> writes:
> >> 6 nov. 2019 kl. 03:03 skrev Thomas Munro <thomas.munro@gmail.com>:
> >>> *It looks like FreeBSD's port uses the copy of tzdata from the
> >>> PostgreSQL source tree by default and thus that is what you get if you
> >>> install PostgreSQL with "pkg".  That's not a great default IMHO and
> >>> should be changed.
>
> > The decision to use postgresql's tzdata is quite old. It was based on the assumption that postgres is updated more frequently than the operating system, and that for that reason it was better to use postgresql's tzdata, since it would be more accurate more often. This is probably not true anymore, so I agree it should probably be changed to default=system-tzdata on FreeBSD.
> > I will commit an upgrade in Thursday, and unless anybody raise their voice against it, I will change the default setting then.
>
> So it seems that that change was not entirely without fallout:
>
> https://www.postgresql.org/message-id/flat/16118-ef1e45e342c52416%40postgresql.org
>
> I don't think this is reason to revert the change, exactly,
> but it's a concern.  I wonder why FreeBSD editorializes on
> the set of zone names?

Ugh.  It doesn't have the old backward compatibility names like
US/Pacific installed by default, which is a problem if that's what
initdb picked for your cluster (or you've stored references to any of
those names in other ways).





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-15 20:32                 ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
@ 2019-11-15 23:35                   ` Palle Girgensohn <girgen@pingpong.net>
  2019-11-16 06:12                     ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 21+ messages in thread

From: Palle Girgensohn @ 2019-11-15 23:35 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@freebsd.org>



> 15 nov. 2019 kl. 21:32 skrev Thomas Munro <thomas.munro@gmail.com>:
> 
> On Sat, Nov 16, 2019 at 8:38 AM Tom Lane <tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.us>> wrote:
>> Palle Girgensohn <girgen@pingpong.net> writes:
>>>> 6 nov. 2019 kl. 03:03 skrev Thomas Munro <thomas.munro@gmail.com>:
>>>>> *It looks like FreeBSD's port uses the copy of tzdata from the
>>>>> PostgreSQL source tree by default and thus that is what you get if you
>>>>> install PostgreSQL with "pkg".  That's not a great default IMHO and
>>>>> should be changed.
>> 
>>> The decision to use postgresql's tzdata is quite old. It was based on the assumption that postgres is updated more frequently than the operating system, and that for that reason it was better to use postgresql's tzdata, since it would be more accurate more often. This is probably not true anymore, so I agree it should probably be changed to default=system-tzdata on FreeBSD.
>>> I will commit an upgrade in Thursday, and unless anybody raise their voice against it, I will change the default setting then.
>> 
>> So it seems that that change was not entirely without fallout:
>> 
>> https://www.postgresql.org/message-id/flat/16118-ef1e45e342c52416%40postgresql.org
>> 
>> I don't think this is reason to revert the change, exactly,
>> but it's a concern.  I wonder why FreeBSD editorializes on
>> the set of zone names?
> 
> Ugh.  It doesn't have the old backward compatibility names like
> US/Pacific installed by default, which is a problem if that's what
> initdb picked for your cluster (or you've stored references to any of
> those names in other ways).


Ogh, I had no idea of this limitation.

One quick fix is to revert the change. Tom thinks this is not reason to revert. Would it be enough to edit the postgresql.conf to use the correct "modern" name for US/Pacific (PST?)? In rhar case, an update note might be sufficient?

Palle

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-15 20:32                 ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-15 23:35                   ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
@ 2019-11-16 06:12                     ` Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-16 22:06                       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-17 21:10                       ` Re: here does postgres take its timezone information from? Andrew Gierth <andrew@tao11.riddles.org.uk>
  0 siblings, 2 replies; 21+ messages in thread

From: Tom Lane @ 2019-11-16 06:12 UTC (permalink / raw)
  To: Palle Girgensohn <girgen@pingpong.net>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@freebsd.org>

Palle Girgensohn <girgen@pingpong.net> writes:
> 15 nov. 2019 kl. 21:32 skrev Thomas Munro <thomas.munro@gmail.com>:
>> Ugh.  It doesn't have the old backward compatibility names like
>> US/Pacific installed by default, which is a problem if that's what
>> initdb picked for your cluster (or you've stored references to any of
>> those names in other ways).

> One quick fix is to revert the change. Tom thinks this is not reason to revert. Would it be enough to edit the postgresql.conf to use the correct "modern" name for US/Pacific (PST?)? In rhar case, an update note might be sufficient?

I think the "official" name of that zone is America/Los_Angeles.
But initdb might seize on the US/Pacific alias, if available,
because it's shorter.  We've seen related problems with other
time zone names, though usually it was just cosmetic and not a
reason for the postmaster to fail to start.

Yes, changing the zone name in postgresql.conf should be a sufficient
fix.  In theory, a FreeBSD user ought to know the "official" alias
for their zone, since the rest of the system would expect that.
So this is slightly tedious if initdb chose a non-official alias,
but I don't think it's reason to panic.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-15 20:32                 ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-15 23:35                   ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-16 06:12                     ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-11-16 22:06                       ` Thomas Munro <thomas.munro@gmail.com>
  2019-11-17 11:45                         ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  1 sibling, 1 reply; 21+ messages in thread

From: Thomas Munro @ 2019-11-16 22:06 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Palle Girgensohn <girgen@pingpong.net>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@freebsd.org>

On Sat, Nov 16, 2019 at 7:13 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Palle Girgensohn <girgen@pingpong.net> writes:
> > 15 nov. 2019 kl. 21:32 skrev Thomas Munro <thomas.munro@gmail.com>:
> >> Ugh.  It doesn't have the old backward compatibility names like
> >> US/Pacific installed by default, which is a problem if that's what
> >> initdb picked for your cluster (or you've stored references to any of
> >> those names in other ways).
>
> > One quick fix is to revert the change. Tom thinks this is not reason to revert. Would it be enough to edit the postgresql.conf to use the correct "modern" name for US/Pacific (PST?)? In rhar case, an update note might be sufficient?
>
> I think the "official" name of that zone is America/Los_Angeles.
> But initdb might seize on the US/Pacific alias, if available,
> because it's shorter.  We've seen related problems with other
> time zone names, though usually it was just cosmetic and not a
> reason for the postmaster to fail to start.
>
> Yes, changing the zone name in postgresql.conf should be a sufficient
> fix.  In theory, a FreeBSD user ought to know the "official" alias
> for their zone, since the rest of the system would expect that.
> So this is slightly tedious if initdb chose a non-official alias,
> but I don't think it's reason to panic.

Perhaps the best thing would be to revert this for the older
PostgreSQL releases so that people doing minor version upgrades are
inconvenienced by a system that can't start up after "pkg upgrade",
but do it for 12 since not many people will be using that yet?





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-15 20:32                 ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-15 23:35                   ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-16 06:12                     ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-16 22:06                       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
@ 2019-11-17 11:45                         ` Palle Girgensohn <girgen@pingpong.net>
  2019-11-24 15:35                           ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 21+ messages in thread

From: Palle Girgensohn @ 2019-11-17 11:45 UTC (permalink / raw)
  To: Thomas Munro <thomas.munro@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@freebsd.org>



> 16 nov. 2019 kl. 23:06 skrev Thomas Munro <thomas.munro@gmail.com>:
> 
> On Sat, Nov 16, 2019 at 7:13 PM Tom Lane <tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.us>> wrote:
>> Palle Girgensohn <girgen@pingpong.net> writes:
>>> 15 nov. 2019 kl. 21:32 skrev Thomas Munro <thomas.munro@gmail.com>:
>>>> Ugh.  It doesn't have the old backward compatibility names like
>>>> US/Pacific installed by default, which is a problem if that's what
>>>> initdb picked for your cluster (or you've stored references to any of
>>>> those names in other ways).
>> 
>>> One quick fix is to revert the change. Tom thinks this is not reason to revert. Would it be enough to edit the postgresql.conf to use the correct "modern" name for US/Pacific (PST?)? In rhar case, an update note might be sufficient?
>> 
>> I think the "official" name of that zone is America/Los_Angeles.
>> But initdb might seize on the US/Pacific alias, if available,
>> because it's shorter.  We've seen related problems with other
>> time zone names, though usually it was just cosmetic and not a
>> reason for the postmaster to fail to start.
>> 
>> Yes, changing the zone name in postgresql.conf should be a sufficient
>> fix.  In theory, a FreeBSD user ought to know the "official" alias
>> for their zone, since the rest of the system would expect that.
>> So this is slightly tedious if initdb chose a non-official alias,
>> but I don't think it's reason to panic.
> 
> Perhaps the best thing would be to revert this for the older
> PostgreSQL releases so that people doing minor version upgrades are
> inconvenienced by a system that can't start up after "pkg upgrade",
> but do it for 12 since not many people will be using that yet?

That could be a way, yes. Any thoughts on this from others following this thread?

Palle

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-15 20:32                 ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-15 23:35                   ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-16 06:12                     ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-16 22:06                       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-17 11:45                         ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
@ 2019-11-24 15:35                           ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 21+ messages in thread

From: Tom Lane @ 2019-11-24 15:35 UTC (permalink / raw)
  To: Palle Girgensohn <girgen@pingpong.net>; +Cc: Thomas Munro <thomas.munro@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql@freebsd.org <pgsql@freebsd.org>

Palle Girgensohn <girgen@pingpong.net> writes:
> 16 nov. 2019 kl. 23:06 skrev Thomas Munro <thomas.munro@gmail.com>:
>> Perhaps the best thing would be to revert this for the older
>> PostgreSQL releases so that people doing minor version upgrades are
>> inconvenienced by a system that can't start up after "pkg upgrade",
>> but do it for 12 since not many people will be using that yet?

> That could be a way, yes. Any thoughts on this from others following this thread?

I whined about this on the tz mailing list, and got the attention of
the FreeBSD tzdata package maintainer [1].  It seems possible that he'll
change that policy, so I'd advise doing nothing until that discussion
settles.

			regards, tom lane

[1] https://mm.icann.org/pipermail/tz/2019-November/028633.html





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-15 20:32                 ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-15 23:35                   ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-16 06:12                     ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-11-17 21:10                       ` Andrew Gierth <andrew@tao11.riddles.org.uk>
  2019-11-18 01:40                         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 21+ messages in thread

From: Andrew Gierth @ 2019-11-17 21:10 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Palle Girgensohn <girgen@pingpong.net>; Thomas Munro <thomas.munro@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql\@freebsd.org <pgsql@freebsd.org>

>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 >>> Ugh. It doesn't have the old backward compatibility names like
 >>> US/Pacific installed by default, which is a problem if that's what
 >>> initdb picked for your cluster (or you've stored references to any
 >>> of those names in other ways).

 >> One quick fix is to revert the change. Tom thinks this is not reason
 >> to revert. Would it be enough to edit the postgresql.conf to use the
 >> correct "modern" name for US/Pacific (PST?)? In rhar case, an update
 >> note might be sufficient?

 Tom> I think the "official" name of that zone is America/Los_Angeles.
 Tom> But initdb might seize on the US/Pacific alias, if available,

And now you know why I have been saying for so many years that initdb
should use the official names!

-- 
Andrew (irc:RhodiumToad)





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-15 20:32                 ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-15 23:35                   ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-16 06:12                     ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-17 21:10                       ` Re: here does postgres take its timezone information from? Andrew Gierth <andrew@tao11.riddles.org.uk>
@ 2019-11-18 01:40                         ` Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-18 01:56                           ` Re: here does postgres take its timezone information from? Andrew Gierth <andrew@tao11.riddles.org.uk>
  0 siblings, 1 reply; 21+ messages in thread

From: Tom Lane @ 2019-11-18 01:40 UTC (permalink / raw)
  To: Andrew Gierth <andrew@tao11.riddles.org.uk>; +Cc: Palle Girgensohn <girgen@pingpong.net>; Thomas Munro <thomas.munro@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql\@freebsd.org <pgsql@freebsd.org>

Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
>  Tom> I think the "official" name of that zone is America/Los_Angeles.
>  Tom> But initdb might seize on the US/Pacific alias, if available,

> And now you know why I have been saying for so many years that initdb
> should use the official names!

[ shrug... ] The installed format doesn't provide any way to
distinguish which are the "official" names.  They're typically
all hardlinks to the same file.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 22:54 ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-05 23:00   ` Re: here does postgres take its timezone information from? Chris Withers <chris@withers.org>
  2019-11-05 23:02     ` Re: here does postgres take its timezone information from? Adrian Klaver <adrian.klaver@aklaver.com>
  2019-11-06 00:18       ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-06 01:20         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-06 02:03           ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-12 14:40             ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-15 19:38               ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-15 20:32                 ` Re: here does postgres take its timezone information from? Thomas Munro <thomas.munro@gmail.com>
  2019-11-15 23:35                   ` Re: here does postgres take its timezone information from? Palle Girgensohn <girgen@pingpong.net>
  2019-11-16 06:12                     ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
  2019-11-17 21:10                       ` Re: here does postgres take its timezone information from? Andrew Gierth <andrew@tao11.riddles.org.uk>
  2019-11-18 01:40                         ` Re: here does postgres take its timezone information from? Tom Lane <tgl@sss.pgh.pa.us>
@ 2019-11-18 01:56                           ` Andrew Gierth <andrew@tao11.riddles.org.uk>
  0 siblings, 0 replies; 21+ messages in thread

From: Andrew Gierth @ 2019-11-18 01:56 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Palle Girgensohn <girgen@pingpong.net>; Thomas Munro <thomas.munro@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; Chris Withers <chris@withers.org>; pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>; pgsql\@freebsd.org <pgsql@freebsd.org>

>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:

 Tom> Andrew Gierth <andrew@tao11.riddles.org.uk> writes:
 Tom> I think the "official" name of that zone is America/Los_Angeles.
 Tom> But initdb might seize on the US/Pacific alias, if available,

 >> And now you know why I have been saying for so many years that initdb
 >> should use the official names!

 Tom> [ shrug... ] The installed format doesn't provide any way to
 Tom> distinguish which are the "official" names. They're typically all
 Tom> hardlinks to the same file.

zone.tab / zone1970.tab. Which I first pointed out before 8.2 came
out...

-- 
Andrew.





^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: here does postgres take its timezone information from?
  2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
@ 2019-11-05 22:58 ` Adrian Klaver <adrian.klaver@aklaver.com>
  1 sibling, 0 replies; 21+ messages in thread

From: Adrian Klaver @ 2019-11-05 22:58 UTC (permalink / raw)
  To: Chris Withers <chris@withers.org>; pgsql-general@lists.postgresql.org

On 11/5/19 2:46 PM, Chris Withers wrote:
> Hi All,
> 
> Brazil recently abolished daylight savings time, resulting in updates to 
> system timezone information packages.
> Does postgres use these? If so, does it need a reload or restart to see 
> the updated zone info?
> 
> If not, how does postgres store/obtain its timezone zone information and 
> how would this be updated?
> 

As to where it gets its timezone info:

https://www.postgresql.org/docs/11/datetime-config-files.html

> cheers,
> 
> Chris
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 21+ messages in thread


end of thread, other threads:[~2019-11-24 15:35 UTC | newest]

Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 22:46 here does postgres take its timezone information from? Chris Withers <chris@withers.org>
2019-11-05 22:54 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-11-05 23:00   ` Chris Withers <chris@withers.org>
2019-11-05 23:02     ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-11-06 00:18       ` Thomas Munro <thomas.munro@gmail.com>
2019-11-06 01:20         ` Tom Lane <tgl@sss.pgh.pa.us>
2019-11-06 02:03           ` Thomas Munro <thomas.munro@gmail.com>
2019-11-12 14:40             ` Palle Girgensohn <girgen@pingpong.net>
2019-11-13 00:45               ` Thomas Munro <thomas.munro@gmail.com>
2019-11-13 14:41                 ` Tom Lane <tgl@sss.pgh.pa.us>
2019-11-15 19:38               ` Tom Lane <tgl@sss.pgh.pa.us>
2019-11-15 20:32                 ` Thomas Munro <thomas.munro@gmail.com>
2019-11-15 23:35                   ` Palle Girgensohn <girgen@pingpong.net>
2019-11-16 06:12                     ` Tom Lane <tgl@sss.pgh.pa.us>
2019-11-16 22:06                       ` Thomas Munro <thomas.munro@gmail.com>
2019-11-17 11:45                         ` Palle Girgensohn <girgen@pingpong.net>
2019-11-24 15:35                           ` Tom Lane <tgl@sss.pgh.pa.us>
2019-11-17 21:10                       ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2019-11-18 01:40                         ` Tom Lane <tgl@sss.pgh.pa.us>
2019-11-18 01:56                           ` Andrew Gierth <andrew@tao11.riddles.org.uk>
2019-11-05 22:58 ` Adrian Klaver <adrian.klaver@aklaver.com>

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