Re: unique indexes on partitioned tables

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: unique indexes on partitioned tables
Date: 2018-01-06 13:09:53
Message-ID: CANP8+jL_vq7pLhtU9qTKKnRPtrL2EFky6uEimS8nbAqswQoqig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 29 December 2017 at 23:06, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
> This is the patch series for UNIQUE / PRIMARY KEY indexes on partitioned
> tables. This is on top of the patch in
> https://postgr.es/m/20171229175930.3aew7lzwd5w6m2x6@alvherre.pgsql
> but I included it here as 0001 for simplicity. (Don't review that patch
> in this thread please). This is essentially the same patch I posted
> elsewhere in that thread.

This is a very simple patch, so not much to object to. Most of the
code is about passing the details thru APIs.

Looks good to go.

The comments are slightly better than the explanation in the docs.

> I included Amit's support for ON CONFLICT DO UPDATE, but as I mentioned
> in the other thread, it has a small bug. In principle we could push
> 0002 together with 0003, but I'd rather fix 0004 first and push it all
> as one commit.

I agree we want 0004 also, but it would be simpler to just push 0002
and 0003 now and come back later for 0004. That would also avoid any
confusion over patch credits.

> This serves as basis to build foreign keys on top; I'll post that
> separately.

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marco Nenciarini 2018-01-06 14:40:58 Re: [PATCH] Logical decoding of TRUNCATE
Previous Message David Rowley 2018-01-06 13:03:32 Re: [HACKERS] Removing [Merge]Append nodes which contain a single subpath