Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jDfeW-0006ap-KM for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Mar 2020 02:38:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jDfeT-0001fX-6N for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Mar 2020 02:38:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jDfeS-0001fQ-U4 for pgsql-bugs@lists.postgresql.org; Mon, 16 Mar 2020 02:38:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jDfeO-0006ff-Qf for pgsql-bugs@lists.postgresql.org; Mon, 16 Mar 2020 02:38:47 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 02G2cUKO028095; Sun, 15 Mar 2020 22:38:30 -0400 From: Tom Lane To: Amit Langote cc: digoal@126.com, PostgreSQL mailing lists Subject: Re: BUG #16302: too many range table entries - when count partition table(65538 childs) In-reply-to: References: <16302-e45634e2c0e34e97@postgresql.org> <32763.1584198185@sss.pgh.pa.us> Comments: In-reply-to Amit Langote message dated "Mon, 16 Mar 2020 11:27:55 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28093.1584326310.1@sss.pgh.pa.us> Date: Sun, 15 Mar 2020 22:38:30 -0400 Message-ID: <28094.1584326310@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Amit Langote writes: > On Sun, Mar 15, 2020 at 12:03 AM Tom Lane wrote: >> PG Bug reporting form 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