Re: How Postgresql Compares For Query And Load Operations - Mailing list pgsql-general

From Tom Lane
Subject Re: How Postgresql Compares For Query And Load Operations
Date
Msg-id 9902.995734847@sss.pgh.pa.us
Whole thread Raw
In response to Re: How Postgresql Compares For Query And Load Operations  ("Mitch Vincent" <mvincent@cablespeed.com>)
List pgsql-general
"Mitch Vincent" <mvincent@cablespeed.com> writes:
> What's the story with count(), are there overflow fears there too?

count() is just a plain int4 counter.  Obviously it could overflow with
more than 2^31 rows, but we haven't yet had many (any?) complaints about
that, so I'm not in a big hurry to change it.

OTOH, if we decide it's OK for sum(int4) to work better on machines with
int8 support than on those without, maybe it'd make sense to change
count() to use int8 too.

>> Another consideration is what about machines without any 64-bit int
>> support.  These machines would end up using a 32-bit int accumulator,
>> which would mean they'd be back to the pre-7.1 behavior in which sum()
>> could overflow.  Is this okay?

> I wonder how many PG users this would affect..... Any idea?

A fairly small minority, I'm sure; but as usual, there's no way to know
just how many...

            regards, tom lane

pgsql-general by date:

Previous
From: Roderick Scott Corporation
Date:
Subject: Microsoft SQL Server Replication
Next
From: "Roderick A. Anderson"
Date:
Subject: Re: Language C - Console-based FrontEnd