Re: PSQL error: total cell count of XXX exceeded - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: PSQL error: total cell count of XXX exceeded
Date
Msg-id 202311202048.n2a3dsjldhne@alvherre.pgsql
Whole thread Raw
In response to Re: PSQL error: total cell count of XXX exceeded  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: PSQL error: total cell count of XXX exceeded
List pgsql-hackers
On 2023-Sep-12, Tom Lane wrote:

> I'm more than a bit skeptical about trying to do something about this,
> simply because this range of query result sizes is far past what is
> practical.  The OP clearly hasn't tested his patch on actually
> overflowing query results, and I don't care to either.

I think we're bound to hit this limit at some point in the future, and
it seems easy enough to solve.  I propose the attached, which is pretty
much what Hongxu last submitted, with some minor changes.

Having this make a difference requires some 128GB of RAM, so it's not a
piece of cake, but it's an amount that can be reasonably expected to be
physically installed in real machines nowadays.

(I first thought we could just use pg_mul_s32_overflow during
printTableInit and raise an error if that returns true, but that just
postpones the problem.)

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
Subversion to GIT: the shortest path to happiness I've ever heard of
                                                (Alexey Klyukin)

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add recovery to pg_control and remove backup_label
Next
From: Robert Haas
Date:
Subject: Re: Partial aggregates pushdown