Reproducibility (Re: Remove distprep) - Mailing list pgsql-hackers

From Christoph Berg
Subject Reproducibility (Re: Remove distprep)
Date
Msg-id ZONXPwOYEWZaMdGY@msg.df7cb.de
Whole thread Raw
In response to Re: Remove distprep  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Re: Michael Paquier
> Is reproducibility something you've brought to a separate thread?
> FWIW, I'd be interested in improving this area for the in-core code,
> if need be.  (Not material for this thread, of course).

All the "normal" things like C compilation are actually already
reproducible.

The bit addressed by the mentioned patch is that the compiler flags
are recorded for later output by pg_config, and that includes
-ffile-prefix-map=/path/to/source=. which does improve C
reproducibility, but ironically is itself not reproducible when the
source is then compiled in a different directory. The patch simply
removes that flag from the information stored.

https://salsa.debian.org/postgresql/postgresql/-/blob/15/debian/patches/filter-debug-prefix-map

Not sure not much of that would be material for inclusion in PG.

This fix made PG 10 reproducible in Debian for about a week. Then LLVM
happened :D. The .bc files still record the build path, and so far no
one has found a way to prevent that:

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/arm64/diffoscope-results/postgresql-15.html

Afaict that's the last part to be resolved (but it's been a while
since I checked). clang seems to have learned about -ffile-prefix-map=
in the meantime, that needs to be tested.

Christoph



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Oversight in reparameterize_path_by_child leading to executor crash
Next
From: Andy Fan
Date:
Subject: Re: Support run-time partition pruning for hash join