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 1jECax-0008G7-3d for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Mar 2020 13:49:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jECav-0005pb-Qt for pgsql-bugs@arkaria.postgresql.org; Tue, 17 Mar 2020 13:49:21 +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 1jECav-0005pU-Ir for pgsql-bugs@lists.postgresql.org; Tue, 17 Mar 2020 13:49:21 +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 1jECat-0006wy-AA for pgsql-bugs@lists.postgresql.org; Tue, 17 Mar 2020 13:49:21 +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 02HDmxWf031332; Tue, 17 Mar 2020 09:48:59 -0400 From: Tom Lane To: Robert Haas cc: Amit Langote , 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> <28094.1584326310@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 17 Mar 2020 07:42:41 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31330.1584452939.1@sss.pgh.pa.us> Date: Tue, 17 Mar 2020 09:48:59 -0400 Message-ID: <31331.1584452939@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Sun, Mar 15, 2020 at 10:38 PM Tom Lane wrote: >> 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. > Would would be the downside to raising INNER_VAR to, say, a billion? We'd have to widen AttrNumber to int32 and find all the places that assume it's only 16 bits. (Good luck with testing your way to having any confidence in having found them all, so I'm not sure exactly how to acquire such confidence.) Maybe someday that will be a profitable use of developer effort, but I have to say that I think that day is a long way off. regards, tom lane