pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Ullrich <chris@chrullrich.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: michael.paquier@gmail.com
Cc: pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c.
Date: Tue, 29 Mar 2016 11:28:05 +0200
Message-ID: <56FA4AA5.4030205@chrullrich.net> (raw)
In-Reply-To: <56FA28AD.3080604@chrullrich.net>
References: <E1akeZU-0003B5-HB@gemulon.postgresql.org>
	<CAB7nPqQHd1manQ2Yn3P6L82KNMR_iGC2v5AhVgygiCOc2XpbKQ@mail.gmail.com>
	<32628.1459221714@sss.pgh.pa.us>
	<56FA0634.9020007@chrullrich.net>
	<14980.1459228179@sss.pgh.pa.us>
	<56FA28AD.3080604@chrullrich.net>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

* Christian Ullrich wrote:

> * Tom Lane wrote:

>> Christian Ullrich <chris@chrullrich.net> writes:

>>> 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?
>
> I'd love to, but with 656ee84 I cannot reproduce on my Windows 10
> system. I can try on the animals where it actually failed, but now that
> there's a fix, that won't be necessary, right?

Weird. vcregress check works, install fails. Perhaps the directories are 
precreated for check?

Anyway, I think Michael's fix is wrong. The bug is that the Win32 
version of link() (at the bottom of zic.c) does not set errno if its 
attempt to copy the file fails, so what dolink() puts into link_errno is 
bogus.

The additional mkdirs() call just papers over the actual bug; the 
existing one in line 802 will do nicely once it actually runs.

Patch attached.

-- 
Christian

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

zic-link.patch (text/plain, 485B) download diff --git a/src/timezone/zic.c b/src/timezone/zic.c new file mode 100644 index 8d4347a..ce30740 *** a/src/timezone/zic.c --- b/src/timezone/zic.c *************** int *** 3485,3491 **** --- 3485,3496 ---- link(const char *oldpath, const char *newpath) { if (!CopyFile(oldpath, newpath, false)) + { + DWORD err = GetLastError(); + if (err == ERROR_PATH_NOT_FOUND || err == ERROR_FILE_NOT_FOUND) + errno = ENOENT; return -1; + } return 0; } #endif

view thread (13+ messages)  latest in thread

Message-ID: <56FA4AA5.4030205@chrullrich.net>
Permalink:  ../56FA4AA5.4030205@chrullrich.net/
Also on:    postgresql.org/message-id/56FA4AA5.4030205@chrullrich.net

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: chris@chrullrich.net, tgl@sss.pgh.pa.us, michael.paquier@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Sync tzload() and tzparse() APIs with IANA release tzcode2016c.
  In-Reply-To: <56FA4AA5.4030205@chrullrich.net>
  References: <E1akeZU-0003B5-HB@gemulon.postgresql.org> <CAB7nPqQHd1manQ2Yn3P6L82KNMR_iGC2v5AhVgygiCOc2XpbKQ@mail.gmail.com> <32628.1459221714@sss.pgh.pa.us> <56FA0634.9020007@chrullrich.net> <14980.1459228179@sss.pgh.pa.us> <56FA28AD.3080604@chrullrich.net> <56FA4AA5.4030205@chrullrich.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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