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 1pqbJU-0006ET-KB for pgsql-admin@arkaria.postgresql.org; Sun, 23 Apr 2023 15:07:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pqbJT-0000kl-Ga for pgsql-admin@arkaria.postgresql.org; Sun, 23 Apr 2023 15:07: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 1pqbJT-0000kc-5e for pgsql-admin@lists.postgresql.org; Sun, 23 Apr 2023 15:07:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pqbJQ-004dK0-Ql for pgsql-admin@lists.postgresql.org; Sun, 23 Apr 2023 15:07:38 +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 33NF7Ytt3840295; Sun, 23 Apr 2023 11:07:34 -0400 From: Tom Lane To: ROHIT SACHDEVA cc: pgsql-admin@lists.postgresql.org Subject: Re: Related To Hash Partition In-reply-to: References: Comments: In-reply-to ROHIT SACHDEVA message dated "Sun, 23 Apr 2023 12:34:15 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3840293.1682262454.1@sss.pgh.pa.us> Date: Sun, 23 Apr 2023 11:07:34 -0400 Message-ID: <3840294.1682262454@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ROHIT SACHDEVA writes: > While using hash partition i am facing the problem that the data is not > going into the proper partition table . Define "proper". It's generally best to assume that the hash function is a black box --- if you assume you know which partition a given key value will be mapped to, you are doing something very fragile, and people will have no sympathy for you when it breaks. If you want a predictable mapping, use list or range partitioning, not hash. regards, tom lane