Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)
Дата
Msg-id 7191.1525879090@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] Cutting initdb's runtime (Perl question embedded)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Indexes on partitioned tables and foreign partitions
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Indexes on partitioned tables and foreign partitions