pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
Cc: John Naylor <jcnaylor@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Andreas Karlsson <andreas@proxel.se>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)
Date: Wed, 09 May 2018 11:18:10 -0400
Message-ID: <7191.1525879090@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYGgrLazC_eHfBsH2N2YDMhUi6nK_hsXgM5LFmgoSSYVg@mail.gmail.com>
References: <30896.1492006367@sss.pgh.pa.us>
	<a15e94ac-c346-5816-69ae-ec6811e32af1@proxel.se>
	<972d541d-7285-53ff-ea71-dcbfd886570a@proxel.se>
	<6312.1492100010@sss.pgh.pa.us>
	<d8jpogbq8r1.fsf@dalvik.ping.uio.no>
	<20170417165315.7jtyajt7unjp56ii@alap3.anarazel.de>
	<7985.1492448973@sss.pgh.pa.us>
	<d8jinm2qdhj.fsf@dalvik.ping.uio.no>
	<7408.1525812528@sss.pgh.pa.us>
	<CA+TgmoYGgrLazC_eHfBsH2N2YDMhUi6nK_hsXgM5LFmgoSSYVg@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, May 8, 2018 at 4:48 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Really the only thing here that jumps out as being unduly expensive for
>> what it's doing is select_default_timezone.  That is, and always has been,
>> a brute-force algorithm; I wonder if there's a way to do better?

> Who says we need a portable way?  If we had something that worked on
> Linux and macOS, it would cover most developer environments.  I wonder
> if readlink("/etc/localtime", buf, sz) might be a viable approach.

I wondered about that, but I'm afraid it's often a hardlink not a
symlink.  Still, we could try it.

> Also, how about having a --timezone option for initdb?

We already have that, it's called the TZ environment variable.

There was an effort awhile back to try to speed up the buildfarm
by having that get set automatically, but it failed for reasons
I don't recall ATM.

			regards, tom lane




view thread (52+ messages)  latest in thread

Message-ID: <7191.1525879090@sss.pgh.pa.us>
Permalink:  ../7191.1525879090@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7191.1525879090@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, ilmari@ilmari.org, jcnaylor@gmail.com, andres@anarazel.de, andreas@proxel.se
  Subject: Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)
  In-Reply-To: <7191.1525879090@sss.pgh.pa.us>

* 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