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 1kyqCM-0002hB-WD for pgsql-general@arkaria.postgresql.org; Mon, 11 Jan 2021 05:57:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kyqCK-0007a2-Av for pgsql-general@arkaria.postgresql.org; Mon, 11 Jan 2021 05:57:00 +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 1kyqCJ-0007Yx-VC for pgsql-general@lists.postgresql.org; Mon, 11 Jan 2021 05:57:00 +0000 Received: from forward103o.mail.yandex.net ([37.140.190.177]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyqCG-0005LM-IQ for pgsql-general@lists.postgresql.org; Mon, 11 Jan 2021 05:56:58 +0000 Received: from forward103q.mail.yandex.net (forward103q.mail.yandex.net [IPv6:2a02:6b8:c0e:50:0:640:b21c:d009]) by forward103o.mail.yandex.net (Yandex) with ESMTP id 80B115F81590 for ; Mon, 11 Jan 2021 08:56:53 +0300 (MSK) Received: from vla1-14b98e232a11.qloud-c.yandex.net (vla1-14b98e232a11.qloud-c.yandex.net [IPv6:2a02:6b8:c0d:1389:0:640:14b9:8e23]) by forward103q.mail.yandex.net (Yandex) with ESMTP id 7C2DD61E000C for ; Mon, 11 Jan 2021 08:56:53 +0300 (MSK) Received: from localhost (localhost [::1]) by vla1-14b98e232a11.qloud-c.yandex.net (mxback/Yandex) with ESMTP id mFAhRndKYd-uqEqHBSm; Mon, 11 Jan 2021 08:56:53 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1610344613; bh=4zJF7zEyv0Ory8HvOLDOwGmPfr+/lWoKSSQt80kS+Yw=; h=Message-Id:Date:Subject:To:From; b=Orp+eDW16E5eTSKtyNLTHV/D3JDsO/TWsDAFPp+0kFQdWXD5PERD6bQpB/RE19Igq HvPhscJI/0hPIk9ysRydnuE/mbVcs14KkRjGGM1oqO3dBEKkMapO96Nv3Gxt83SBdX Mlv8g/SXB+aJx/DkRxD6tu/2ZNnCAhxUsEWcMYww= Authentication-Results: vla1-14b98e232a11.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru Received: by vla5-c7b28c6912c3.qloud-c.yandex.net with HTTP; Mon, 11 Jan 2021 08:56:52 +0300 From: =?utf-8?B?0JPQvtC70YPQsdC10LLQsCDQr9C90LA=?= To: "pgsql-general@lists.postgresql.org" Subject: Define hash partition for certain column values MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Mon, 11 Jan 2021 08:56:52 +0300 Message-Id: <2278581610342154@mail.yandex.ru> Content-Transfer-Encoding: 8bit Content-Type: text/html; charset=utf-8 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk
Hello,
 
I've found in source code that there is a function satisfies_hash_partition(oid, modulus, remainder, column_values[]) which allows to check if the certain column value will be placed in the certain partition.
I' d like to know if there is an opportunity not to check the certain partition but to define which partition will be the certain column value placed in. Something like define_hash_partition(oid, column_values[]) which returns the remainder value.
It is not very convenient to use satisfies_hash_partition for this purpose because there could be a lot of partitions and it takes time to check each one of them.
If there isn't such opportunity for now I think it would be useful to have such feature in the next releases. What do you think about it?
 
Thank you!
Iana Golubeva