Re: Defend against -ffast-math in meson builds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Defend against -ffast-math in meson builds
Date: 2026-03-11 15:19:45
Message-ID: 3316.1773242385@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(at)eisentraut(dot)org> writes:
> The existing check in configure is because certain Linux distributions
> used to compile everything with -ffast-math to be "faster", and that
> kept breaking PostgreSQL and so we wanted to stop them very early.
> These are gone, and the defenses in the code like date.c should be
> sufficient for any new attempts. I think we could remove the check in
> configure.

The defenses in those modules are probably obsolete too: aren't they about
ensuring exact results with floating-point timestamps? My gut reaction to
this was maybe we could remove *all* of that, so now I'm curious what
problem Bertrand ran into.

It could be that these old defenses are protecting us against roundoff
issues in some relatively-new floating-point functions, but if that's
true then we should move the checks to where they are important today.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2026-03-11 15:49:12 Re: Defend against -ffast-math in meson builds
Previous Message Andres Freund 2026-03-11 15:17:39 Re: n_dead_tup could be way off just after a vacuum