Re: Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c.

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christian Ullrich <chris(at)chrullrich(dot)net>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c.
Date: 2016-03-29 06:21:19
Message-ID: CAB7nPqSkkj6nnotTqRFJvdWugw2ZnY8cJ-oNJ3PHTee7Jw8QQg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Mar 28, 2016 at 10:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Christian Ullrich <chris(at)chrullrich(dot)net> writes:
>> * Tom Lane wrote:
>>> Yeah. I've been staring at that for awhile, but it's not clear where
>>> the problem is. There are a bunch of other SET TIME ZONE commands in
>>> the regression tests, how is it that this trivial case fails on the
>>> Windows critters?
>
>> zic aborts somewhere between writing Etc/UTC and UTC.
>
> Huh ... I would not have guessed that. Can you track down exactly
> where it's failing?

It is failing when attempting to create the link for Pacific_new, and
so the rest is not created at all.

> We absorbed some new code in zic.c for creating subdirectories of the
> target timezone directory, and said code seemed a bit odd to me,
> but I supposed that the IANA guys had debugged it already. Maybe not.
> Or maybe the problem is with some specific input file that gets
> reached somewhere in that range?

The issue is in dolink() visibly. The first time link() is called it
fails on EEXIST (?), but there is no retry because the target link,
US/Pacific-new is not a directory. But note that contrary to the
previous version of the code, link() is not attempted again, symlink
is called instead (HAVE_SYMLINK is actually missing here!) or an
open/getc/close is done to do a copy of the file.

With the WIP patch attached, I am still getting 4 warnings "symbolic
link used because hard link failed", at least it fixes the issue.
--
Michael

Attachment Content-Type Size
zic-ms-fix.patch binary/octet-stream 763 bytes

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Christian Ullrich 2016-03-29 07:03:09 Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c.
Previous Message Tom Lane 2016-03-29 05:09:39 Re: Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c.

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2016-03-29 06:37:06 Re: Odd system-column handling in postgres_fdw join pushdown patch
Previous Message Fabien COELHO 2016-03-29 05:53:47 Re: extend pgbench expressions with functions