Amit Langote <amitlangote09@gmail.com> writes:
> On Sun, Mar 15, 2020 at 12:03 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> PG Bug reporting form <noreply@postgresql.org> writes:
>>> ERROR: 54000: too many range table entries
>> This hardly seems like a bug. We do not support an infinite number of
>> partitions --- and in the real world, performance would have tanked
>> long before you got to this many partitions.
> Would it make sense to document this hard upper bound on the number of
> relations that can be handled by a query?
Well, if we say "PG can handle up to 64K relations in a query",
I think people would read that as meaning that you actually get
usable performance with up to 64K relations. Which is a long
way away, even if certain specific cases might work acceptably.
The existing docs discourage using more than a few thousand
partitions, IIRC, and that seems like sufficient guidance for now.
regards, tom lane