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 1p0J6R-0004h4-Ah for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Nov 2022 09:10: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 1p0J6O-0006qW-U2 for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Nov 2022 09:10:00 +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 1p0J6O-0006qG-KZ for pgsql-hackers@lists.postgresql.org; Wed, 30 Nov 2022 09:10:00 +0000 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p0J6K-0005aa-HV for pgsql-hackers@lists.postgresql.org; Wed, 30 Nov 2022 09:09:59 +0000 Received: (Authenticated sender: vik@postgresfriends.org) by mail.gandi.net (Postfix) with ESMTPSA id 677721BF209; Wed, 30 Nov 2022 09:09:50 +0000 (UTC) Message-ID: <922afef1-430c-e929-2589-ec3190bb11d7@postgresfriends.org> Date: Wed, 30 Nov 2022 10:09:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Patch: Global Unique Index Content-Language: en-US To: Laurenz Albe , Cary Huang , Thomas Kellerer Cc: pgsql-hackers References: <184879c5306.12490ea581628934.7312528450011769010@highgo.ca> <3866851668762233@ja6lqgzbqb6tniny.sas.yp-c.yandex.net> <2187643.1668783992@sss.pgh.pa.us> <6cdcb7b1-2567-1373-79d1-96467a9b305b@gmx.net> <184aada3c76.1258dc67d3231678.3658037825540104775@highgo.ca> <26fcfb7700783faa397c712ea9721090958e0e51.camel@cybertec.at> From: Vik Fearing In-Reply-To: <26fcfb7700783faa397c712ea9721090958e0e51.camel@cybertec.at> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/29/22 17:29, Laurenz Albe wrote: > On Tue, 2022-11-29 at 13:58 +0100, Vik Fearing wrote: >> I disagree.  A user does not need to know that a table is partitionned, >> and if the user wants a unique constraint on the table then making them >> type an extra word to get it is just annoying. > > Hmm. But if I created a primary key without thinking too hard about it, > only to discover later that dropping old partitions has become a problem, > I would not be too happy either. I have not looked at this patch, but my understanding of its design is the "global" part of the index just makes sure to check a unique index on each partition. I don't see from that how dropping old partitions would be a problem. -- Vik Fearing