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-11-01 20:49:38
Message-ID: CAH2-Wz=gue-N6o-6WaWA9+GEsFjbMUmrqE8sJ3xVEhF_01YT9A@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:
> 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.

I think that you meant treble, not double. You're forgetting about the
palloc() header overhead. ;-)

Doing even slightly serious work on a 32-bit machine is penny wise and
pound foolish. I also believe that we should support minority
platforms reasonably well, including 32-bit platforms, because it's
always a good idea to try to meet people where they are. Your proposal
doesn't seem like it really gives up on that goal.

> Those are all worthwhile considerations and perhaps
> strong arguments against my proposal. But, people using 8-byte
> oughta-be-pass-by-value quantities are certainly being harmed by the
> present system. It's not a black-and-white thing, like, oh, 8-byte
> datums on 32-bit system is awful all the time. Or at least, I don't
> think it is.

Right.

> Yeah, I've had to fight with this multiple times, and so have other
> people. It's a nuisance, and it causes bugs, certainly in draft
> patches, sometimes in committed ones. It's not "free." If it's a cost
> worth paying, ok, but is it?

#ifdef crud is something that we should go out of our way to eliminate
on general principle. All good portable C codebases go to great
lengths to encapsulate platform differences, if necessary by adding a
compatibility layer. One of the worst things about the OpenSSL
codebase is that it makes writing portable code everybody's problem.

--
Peter Geoghegan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-11-01 21:38:09 Re: fe-utils - share query cancellation code
Previous Message Alvaro Herrera 2019-11-01 20:33:10 excluding CREATE INDEX CONCURRENTLY from OldestXmin