Re: Remove configure --disable-float4-byval and --disable-float8-byval

From: Peter Geoghegan <pg(at)bowt(dot)ie>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove configure --disable-float4-byval and --disable-float8-byval
Date: 2019-12-12 22:06:03
Message-ID: CAH2-Wzm4VDS7oq8Wxe--5zpnD3pv+6ED8jcoB3UGJ36ByavjmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 1, 2019 at 1:19 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Fri, Nov 1, 2019 at 3:15 PM Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> > I don't think that those two things are equivalent at all. There may
> > even be workloads that will benefit when run on 32-bit hardware.
> > Having to palloc() and pfree() with 8 byte integers is probably very
> > slow.
>
> Yeah! I mean, users who are using only 4-byte or smaller pass-by-value
> quantities will be harmed, especially in cases where they are storing
> a lot of them at the same time (e.g. sorting) and especially if they
> double their space consumption and run out of their very limited
> supply of memory.

Apparently Linux has almost no upstream resources for testing 32-bit
x86, and it shows:

https://lwn.net/ml/oss-security/CALCETrW1z0gCLFJz-1Jwj_wcT3+axXkP_wOCxY8JkbSLzV80GA(at)mail(dot)gmail(dot)com/

I think that this kind of thing argues for minimizing the amount of
code that can only be tested on a small minority of the computers that
are in general use today. If no Postgres hacker regularly runs the
code, then its chances of having bugs are far higher. Having coverage
in the buildfarm certainly helps, but it's no substitute.

Sticking with the !USE_FLOAT8_BYVAL example, it's easy to imagine
somebody forgetting to add a !USE_FLOAT8_BYVAL block, that contains
the required pfree(). Now you have a memory leak that only affects a
small minority of platforms. How likely is it that buildfarm coverage
will help somebody detect that problem?

--
Peter Geoghegan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2019-12-12 22:30:47 Re: Make autovacuum sort tables in descending order of xid_age
Previous Message Mark Dilger 2019-12-12 21:47:23 Re: Make autovacuum sort tables in descending order of xid_age