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 1jD8KE-0002Dj-P4 for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Mar 2020 15:03:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jD8KB-0000u4-Ca for pgsql-bugs@arkaria.postgresql.org; Sat, 14 Mar 2020 15:03:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jD8KB-0000tx-07 for pgsql-bugs@lists.postgresql.org; Sat, 14 Mar 2020 15:03:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jD8K3-0004Lu-QW for pgsql-bugs@lists.postgresql.org; Sat, 14 Mar 2020 15:03:37 +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 02EF35VO032764; Sat, 14 Mar 2020 11:03:06 -0400 From: Tom Lane To: digoal@126.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16302: too many range table entries - when count partition table(65538 childs) In-reply-to: <16302-e45634e2c0e34e97@postgresql.org> References: <16302-e45634e2c0e34e97@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Sat, 14 Mar 2020 14:02:19 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <32762.1584198185.1@sss.pgh.pa.us> Date: Sat, 14 Mar 2020 11:03:05 -0400 Message-ID: <32763.1584198185@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form writes: > when i count a partition table with many childs , it's error below: > postgres=> select count(*) from p; > ERROR: 54000: too many range table entries > LOCATION: add_rte_to_flat_rtable, setrefs.c:425 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. regards, tom lane