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 1lqhyT-0002A8-AP for pgsql-general@arkaria.postgresql.org; Tue, 08 Jun 2021 20:05:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lqhyS-00029E-8E for pgsql-general@arkaria.postgresql.org; Tue, 08 Jun 2021 20:05:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqhyR-000296-Vx for pgsql-general@lists.postgresql.org; Tue, 08 Jun 2021 20:05:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqhyM-00040u-Ug for pgsql-general@lists.postgresql.org; Tue, 08 Jun 2021 20:05:19 +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 158K5ESa1175437; Tue, 8 Jun 2021 16:05:14 -0400 From: Tom Lane To: Marc Millas cc: "pgsql-general@lists.postgresql.org" Subject: Re: index unique In-reply-to: References: <20210607065501.GA17125@hjp.at> <20210607220848.GB17125@hjp.at> <20210608184212.GA9580@hjp.at> Comments: In-reply-to Marc Millas message dated "Tue, 08 Jun 2021 21:22:42 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1175435.1623182714.1@sss.pgh.pa.us> Date: Tue, 08 Jun 2021 16:05:14 -0400 Message-ID: <1175436.1623182714@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Marc Millas writes: > I know, its clearly stated in postgres doc about btree," The only > limitation is that an index entry cannot exceed approximately one-third of > a page (after TOAST compression, if applicable)." Yup. > is there any plan to adress this ? No. The cost/benefit ratio seems completely untenable. The usual recommendation is that you shorten long values by hashing them, eg create a unique index on md5(my_long_column). regards, tom lane