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 1on89R-00033x-2c for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Oct 2022 00:50:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1on89P-0008Ls-QE for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Oct 2022 00:50:39 +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 1on89P-0008JD-GK for pgsql-hackers@lists.postgresql.org; Tue, 25 Oct 2022 00:50:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1on89M-0002eu-P1 for pgsql-hackers@lists.postgresql.org; Tue, 25 Oct 2022 00:50:39 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 29P0oOfh3930527; Mon, 24 Oct 2022 20:50:24 -0400 From: Tom Lane To: Alvaro Herrera cc: "Finnerty, Jim" , Japin Li , Justin Pryzby , "pgsql-hackers@lists.postgresql.org" Subject: Re: parse partition strategy string in gram.y In-reply-to: <20221024161317.3ywktkv2ghqpp4as@alvherre.pgsql> References: <20221024161317.3ywktkv2ghqpp4as@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Mon, 24 Oct 2022 18:13:17 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3930525.1666659024.1@sss.pgh.pa.us> Date: Mon, 24 Oct 2022 20:50:24 -0400 Message-ID: <3930526.1666659024@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > On 2022-Oct-24, Finnerty, Jim wrote: >> The advantage of hash partition bounds is that they are not >> domain-specific, as they are for ordinary RANGE partitions, but they >> are more flexible than MODULUS/REMAINDER partition bounds. I'm more than a bit skeptical of that claim. Under what circumstances (other than a really awful hash function, perhaps) would it make sense to not use equi-sized hash partitions? If you can predict that more stuff is going to go into one partition than another, then you need to fix your hash function, not invent more complication for the core partitioning logic. regards, tom lane