Re: preserve timestamps when installing headers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: preserve timestamps when installing headers
Date
Msg-id 3001527.1638773499@sss.pgh.pa.us
Whole thread Raw
In response to Re: preserve timestamps when installing headers  (Michael Paquier <michael@paquier.xyz>)
Responses Re: preserve timestamps when installing headers  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
List 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 by date:

Previous
From: Amit Kapila
Date:
Subject: Re: row filtering for logical replication
Next
From: Amit Kapila
Date:
Subject: Re: row filtering for logical replication