Re: stat /etc/localtime 38000 times on startup?

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: stat /etc/localtime 38000 times on startup?
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE92E98B@algol.sollentuna.se
обсуждение исходный текст
Ответ на stat /etc/localtime 38000 times on startup?  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
> I just traced starting up a postmaster, and got over 38000
> lines like this:
>
>    stat64("/etc/localtime", {st_mode=S_IFREG|0644,
> st_size=1267, ...}) = 0
>
> I assume it comes from the timezone library, but it seems
> highly inefficient. Anyone know why we might get this?

Without digging into details, I would guess htat comes from the probing
of available timezones to find one that matches the current one. We do a
whole lot of setting/resetting the TZ there - but only during postmaster
startup.

//Magnus


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

Предыдущее
От: "Alon Goldshuv"
Дата:
Сообщение: Libpq COPY optimization
Следующее
От: Andrew Dunstan
Дата:
Сообщение: plperl header fix and rationalisation