RE: Partition column should be part of PK

2021-07-12 Thread Michel SALAIS
have to be rebuilt. But, anyway, such operations could be done "concurrently" or "online"... Michel SALAIS -Message d'origine- De : David Rowley Envoyé : lundi 12 juillet 2021 02:57 À : Nagaraj Raj Cc : Christophe Pettus ; pgsql-performa...@postgresql.org Objet :

Re: Partition column should be part of PK

2021-07-11 Thread Thomas Kellerer
David Rowley schrieb am 12.07.2021 um 02:57: > Generally, there's not all that much consensus in the community that > this would be a good feature to have. Why do people want to use > partitioning? Many people do it so that they can quickly remove data > that's no longer required with a simple

Re: Partition column should be part of PK

2021-07-11 Thread David Rowley
On Mon, 12 Jul 2021 at 12:37, Nagaraj Raj wrote: > personally, I feel this design is very bad compared to other DB servers. I'm not sure exactly what you're referring to here as you didn't quote it, but my guess is you mean our lack of global index support. Generally, there's not all that much c

Re: Partition column should be part of PK

2021-07-11 Thread Christophe Pettus
> On Jul 11, 2021, at 17:36, Nagaraj Raj wrote: > > personally, I feel this design is very bad compared to other DB servers. Patches accepted. The issue is that in order to have a partition-set-wide unique index, the system would have to lock the unique index entries in *all* partitions, n

Re: Partition column should be part of PK

2021-07-11 Thread Justin Pryzby
On Fri, Jul 09, 2021 at 03:32:46AM +, Nagaraj Raj wrote: > My apologies for making confusion with new thread. Yes its same issue related > to earlier post. > I was trying to figure out  how to ensure unique values for columns > (billing_account_guid, ban). If i add partition key to constraint

Re: Partition column should be part of PK

2021-07-11 Thread Nagaraj Raj
personally, I feel this design is very bad compared to other DB servers. > If the goal is to make sure there is only one (billing_account_uid, ban) in > any partition regardless of date, you'll need to do something more >  > sophisticated to make sure that two sessions don't insert an > (billing

Re: Partition column should be part of PK

2021-07-08 Thread Christophe Pettus
> On Jul 8, 2021, at 20:32, Nagaraj Raj wrote: > > My apologies for making confusion with new thread. Yes its same issue related > to earlier post. > > I was trying to figure out how to ensure unique values for columns > (billing_account_guid, ban). If i add partition key to constraint , i

Re: Partition column should be part of PK

2021-07-08 Thread Nagaraj Raj
Subject: Re: Partition column should be part of PK On 2021-Jul-08, Justin Pryzby wrote: > If I'm not wrong, this is the same thing you asked 2 week ago. > > If so, why not continue the conversation on the same thread, and why > not reference the old thread ? > > I went to

RE: Partition column should be part of PK

2021-07-08 Thread Mike Sofen
: Partition column should be part of PK On 2021-Jul-08, Justin Pryzby wrote: > If I'm not wrong, this is the same thing you asked 2 week ago. > > If so, why not continue the conversation on the same thread, and why > not reference the old thread ? > > I went to the effort to fi

Re: Partition column should be part of PK

2021-07-08 Thread Alvaro Herrera
On 2021-Jul-08, Justin Pryzby wrote: > If I'm not wrong, this is the same thing you asked 2 week ago. > > If so, why not continue the conversation on the same thread, and why not > reference the old thread ? > > I went to the effort to find the old conversation. > https://www.postgresql.org/mess

Re: Partition column should be part of PK

2021-07-08 Thread Justin Pryzby
If I'm not wrong, this is the same thing you asked 2 week ago. If so, why not continue the conversation on the same thread, and why not reference the old thread ? I went to the effort to find the old conversation. https://www.postgresql.org/message-id/20210625042228.gj29...@telsasoft.com If decl

Re: Partition column should be part of PK

2021-06-24 Thread Justin Pryzby
Declarative partitioning was new in v10 In v11, it was allowed to create an index on a partitioned table, including unique indexes. However it's not a "global" index - instead, it's an "inherited" index. For a unique index, uniqueness is enforced within each individual index. And so global uniquen