On Sun, 6 Sept 2026 at 05:01, Tom Lane <[email protected]> wrote: > * In the avg_accum functions, we can argue about how likely it > is that we'd reach overflow of the "sum" fields, but it is completely > insane to expend cycles and code complexity to check for overflow of > the "count" fields. If you can reach 2^63 by repeated addition of 1 > within the lifetime of a PG database, then we have got far worse > problems, eg with WAL LSN overflow.
I thought the same thing and wondered where that came from. On looking at int8inc(), I saw there's a similar check, which seems equally unlikely to hit, so I didn't mention it. David
