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.89) (envelope-from ) id 1hv8z9-0005U5-Hv for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2019 23:35:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hv8z8-0003eq-1h for pgsql-hackers@arkaria.postgresql.org; Tue, 06 Aug 2019 23:35:18 +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 1hv8z7-0003cw-KQ for pgsql-hackers@lists.postgresql.org; Tue, 06 Aug 2019 23:35:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hv8z5-0007E7-G9 for pgsql-hackers@lists.postgresql.org; Tue, 06 Aug 2019 23:35:16 +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 x76NZCkT018363; Tue, 6 Aug 2019 19:35:12 -0400 From: Tom Lane To: Stephen Frost cc: Alvaro Herrera , Pg Hackers Subject: Re: no default hash partition In-reply-to: <20190806230228.GE29202@tamriel.snowman.net> References: <20190806225310.GA17708@alvherre.pgsql> <16738.1565132324@sss.pgh.pa.us> <20190806230228.GE29202@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Tue, 06 Aug 2019 19:02:28 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18361.1565134512.1@sss.pgh.pa.us> Date: Tue, 06 Aug 2019 19:35:12 -0400 Message-ID: <18362.1565134512@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Stephen Frost writes: > * Tom Lane (tgl@sss.pgh.pa.us) wrote: >> Hmm. So given the point about it being hard to predict which hash >> partitions would receive what values ... under what circumstances >> would it be sensible to not create a full set of partitions? Should >> we just enforce that there is a full set, somehow? > I imagine there's good reasons this wasn't just done (for this or > various other things), but couldn't we enforce it by just creating them > all..? Sure would simplify a lot of things for users. Similairly for > list partitions, I would think. Well, with lists Alvaro's point holds: you might know a priori that some of the values are infrequent and don't deserve their own partition. The thing about hash is that the entries should (in theory) get spread out to all partitions pretty evenly, so it's hard to see why a user would want to treat any partition differently from any other. regards, tom lane