Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9I0T-0006r5-TG for pgsql-admin@arkaria.postgresql.org; Mon, 17 Jan 2022 02:44:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n9I0S-0002Oi-8F for pgsql-admin@arkaria.postgresql.org; Mon, 17 Jan 2022 02:44:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9I0R-0002OZ-HW for pgsql-admin@lists.postgresql.org; Mon, 17 Jan 2022 02:44:27 +0000 Received: from admin.sibptus.ru ([2001:19f0:5001:21dc::10]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9I0M-0005kP-JW for pgsql-admin@lists.postgresql.org; Mon, 17 Jan 2022 02:44:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sibptus.ru; s=20181118; h=Message-ID:Subject:To:From:Date:In-Reply-To; bh=r+K0KslDlUYcXPXMKzstsl8bxHQ7J6X+xC/++QSat+Q=; b=CBEx3GhThbVic18tLYCAj2Dc45 kd/C8X2iU7+HGDYpwGldzxZCPI53W8V3N5A64PHrWy9yxmAIHFw5NwzwK7E1tHuDYQ1rigexopGSr dvGSKyPVgUBgyhF8L9KO3pd0cBAj/+CIeQCSA7frx8Ry9IBufjX8Cbzxc34ffPf9SJdA=; Received: from vas by admin.sibptus.ru with local (Exim 4.94.2 (FreeBSD)) (envelope-from ) id 1n9I0J-0004j3-CB for pgsql-admin@lists.postgresql.org; Mon, 17 Jan 2022 02:44:19 +0000 Date: Mon, 17 Jan 2022 02:44:19 +0000 From: Victor Sudakov To: pgsql-admin@lists.postgresql.org Subject: Large number of partitions of a table Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-PGP-Key: http://admin.sibptus.ru/~vas/ X-PGP-Fingerprint: 10E3 1171 1273 E007 C2E9 3532 0DA4 F259 9B5E C634 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dear Colleagues, Do you have success (or disaster) stories for having a large number of partitions in a table (like maybe 10000) in a production database? I've found a great article https://www.depesz.com/2021/01/17/are-there-limits-to-partition-counts/ and basically it says 70000 partitions are OK but would like to hear more opinions especially from production experience. If a table itself has e.g. 50 indexes, partitioning it will create 10000 extra tables and 50*10000=500000 indexes, isn't it a heavy burden on the system catalogs (pg_statistic etc). It may slow down ANALYZE or have some other adverse effects. Any comments welcome. -- Victor Sudakov VAS4-RIPE http://vas.tomsk.ru/ 2:5005/49@fidonet