Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0dFg-0024hO-2D for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Mar 2026 10:26:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w0dFe-00EDnR-0Q for pgsql-hackers@arkaria.postgresql.org; Thu, 12 Mar 2026 10:26:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w0dFd-00EDnH-2l for pgsql-hackers@lists.postgresql.org; Thu, 12 Mar 2026 10:26:46 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w0dFc-00000001koV-1SOp for pgsql-hackers@lists.postgresql.org; Thu, 12 Mar 2026 10:26:45 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-485410a0a8aso8004985e9.2 for ; Thu, 12 Mar 2026 03:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773311203; x=1773916003; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rwJMfQHJezBXcAaqBG4kPliVPt4iWEAsOXjaR1JoDwc=; b=fEecPFPOLyTA2H5RR7ZH2wD2AZHoM3h3kmBVuTA9GwxYqlxQlKUx1lPruJlk8E1LFw BwlF97t+S+IDIkjQ1mvm34tLOUT2KPFf13H6pTz+JMitXvQrV9MbLzSnkNc7ZG1r1ymy W9cu8BfsIRYjWDOWUOZFrKU0oBzvMXdLF5oiV0njEvShUkQQtsozQnm0VVeugP/9MehX +1RzCfY3iwlLzBTKVZ4tG0+hIjihcxk9E9+Tx+dNawcdC0Sg88kgY3pTOkFORU0sd91d ekzIEGZNQ1qyjDC28tCCh+Bjgin6UMlHaz4FdaBcr2I9SLFzqR94BU2JYN6AnSBni8NW z47g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773311203; x=1773916003; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rwJMfQHJezBXcAaqBG4kPliVPt4iWEAsOXjaR1JoDwc=; b=uYXfTv7Lb3PW2+xGM7tcho06Pnq3vUQgXrluSqG+OHWwx0YI9Gh92El7Zqf75v5bRl 9KFJX6N2rPdbgrYGOCZVR5ZNFw3CesklbzzWiFDh+9q1c5oxUSkDSlZHQJvEPs6Tbzcb /xAjj95ZS+ZoRbznBDmXMFDtSjAANR9C9KTxIRUl+sEbNURw4mfYztFV6dW7zURCU/ie zIzOs7ceMJIpJQrkYNa0UOcsMN7tmMGebW8jUmwjXi5IUtcZQyhHFUTeirkZNAMGMBzF NPfCRVYuQ5FZkcY6n2E1EMCRJeiw9Llaq5cUox+TfDsYq1GSLLbsn2yuaTWpDvzDBzsb 9SBA== X-Forwarded-Encrypted: i=1; AJvYcCXbdIEqjKw17lpbFBNHVfwivwUbfb7/LVvbZL4TgUWraPKq2yDjgyLR/PZoxugMfzx/16iL4FGZDBNUu32i@lists.postgresql.org X-Gm-Message-State: AOJu0YyC7KOiP4NeHpvURm/99U4h5stUsySXRVxE/AezMo3lwzZvzjpl a7oPXo8AZJMWyA9rTYW8xGghLniLRxCAFiQN5MhIY2+e7IlxKVTZ6jWxObCzxg== X-Gm-Gg: ATEYQzxc4evRDHrjzAtN1aPBQB651u6tuTKuiPcqgIsSJe4rdSJCnZlEMhDUPmwJOXU McawP+ryh8SCzwa/V8m3W4v1zsrsKaVVu+ARuSwNB+07QEUdLdrVJ31akhEHTmk05eMwpLjPxtJ WVlH+g8TTmraLd9u8QNxlBZLiT+L/3eCDYhixuaiIJKZt+Y5yRuME5lgGreOHENRkFaIedLE/ap sx1T0ETp2lrUmNmRry/YN968ihAPxXbSFqIB9Ff28qZepniHYyoCv8d+9VRUIwPHStWfNGFRAg6 iGBIcUTJyhdKFdUov9ZZ/wKkkfRmSGOfoFbXQdC/ZM/Nh9UntdBCxRcQKBizg5rWmx7Yly7NSgi ugGFNuUZWOEh4HrV4B0aTedBAXkMFxELT4tEENuNNq95mTd+sAcHZVavtjN64doLdZi0CoZ6fdi Cn2R4UXzRqS/98iN2BEUeBr5gPZaERCi3/dK3388huzrcLE+XK5HMAYOUff7k1loA1KRwt7o3gh WGD6989zJnNNF+nwBLYMISmNUuIU7bMi0RLFwukdzlZlTJ+cgqc1hzuNw== X-Received: by 2002:a05:600c:1f8e:b0:485:4394:b0e with SMTP id 5b1f17b1804b1-4854b0be737mr99510505e9.12.1773311202725; Thu, 12 Mar 2026 03:26:42 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-237-197-144.eu-west-3.compute.amazonaws.com. [15.237.197.144]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4854a1a4444sm66800865e9.0.2026.03.12.03.26.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2026 03:26:42 -0700 (PDT) Date: Thu, 12 Mar 2026 10:26:41 +0000 From: Bertrand Drouvot To: Andres Freund Cc: Tom Lane , Peter Eisentraut , pgsql-hackers@lists.postgresql.org Subject: Re: Defend against -ffast-math in meson builds Message-ID: References: <3316.1773242385@sss.pgh.pa.us> <3583.1773247555@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Wed, Mar 11, 2026 at 01:48:31PM -0400, Andres Freund wrote: > Hi, > > On 2026-03-11 12:45:55 -0400, Tom Lane wrote: > > So no, I don't wanna support this. But maybe we should move the > > code-level tests out of the datetime files and into utils/float.h > > or some such place. > > I think it's probably better to have it in a .c file (maybe float.c), I could > kinda imagine some extension intentionally enabling -ffast-math, because it > does something numerically intensive where the incorrectness doesn't matter. I think that you have a good point about the extension. That said a .h file could also prevent the extension to make use of -ffast-math "accidentally". And if they really want it, I think that they could compile the extension with "-ffast-math -U__FAST_MATH__" to make it work. I just tested it and that works but now that I write it that looks like an odd combination, so a .c file looks better. What do you think? Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com