Re: pgsql: Improve performance of timezone loading, especially pg_timezone_

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Improve performance of timezone loading, especially pg_timezone_
Date: 2017-05-07 09:33:20
Message-ID: CAKJS1f8ZCTq8i05zGwBFCO3X8GxtBJeeTzn3YEMARdDBB+T=3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 7 May 2017 at 21:03, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> wrote:
> Perhaps we just need to put the NUL char back, to trim off the filename again:
>
> /* If that didn't work, fall through to do it the hard way */
> fullname[fullnamelen] = '\0';
>
> but I've not yet looked into why the file is missing in the first place.

OK, so it looks like GenerateTimezoneFiles in Install.pm for the MSVC
build does not quite do what make install does for src/timezone.
Nothing seems to pass the -p parameter as the following is doing:

install: all installdirs
ifeq (,$(with_system_tzdata))
$(ZIC) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)

I've attached a patch for review. My perl skills are at "trial and
error" level, so please review carefully.

The attached also adds the NUL char back to fullname in pg_open_tzfile().

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
posixrules_fix.patch application/octet-stream 1.0 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2017-05-07 09:38:45 Re: pgsql: Improve performance of timezone loading, especially pg_timezone_
Previous Message David Rowley 2017-05-07 09:03:54 Re: pgsql: Improve performance of timezone loading, especially pg_timezone_