Re: preserve timestamps when installing headers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: preserve timestamps when installing headers
Дата
Msg-id 3001527.1638773499@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: preserve timestamps when installing headers  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: preserve timestamps when installing headers  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-hackers
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Oct 12, 2021 at 01:22:50PM +0300, Alexander Kuzmenkov wrote:
>> This patch adds `-p` switch to `cp` invocation in
>> these files, to make it preserve timestamps.

> The use of cp instead of $(INSTALL_DATA) for the installation of the
> headers comes from a703269, back from 2005.  How do numbers compare
> today, 16 years later?

According to a nearby copy of POSIX, "cp -p" does a lot more than
preserve timestamps.  It also specifies preserving file ownership,
which seems absolutely catastrophic for the standard use-case of
"build as some ordinary user, then install as root".

TBH, I am not convinced that the complained-of case is enough of a
problem to justify any change in our build rules, even if there
weren't any semantic issues.  If you are worried about build times,
you should be using ccache, and IME builds using ccache are not
terribly impacted by file timestamp changes.

            regards, tom lane



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: row filtering for logical replication
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: row filtering for logical replication