Re: [HACKERS] UPDATE of partition key

From: Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>
Subject: Re: [HACKERS] UPDATE of partition key
Date: 2018-01-16 10:39:12
Message-ID: CAJ3gD9crKU4JFYgs3zOnz1V=Ve2i_w_Koq5WYJp=y0PFZ4w-2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 15 January 2018 at 16:11, Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com> wrote:
> I went ahead and did the above changes. I haven't yet merged these
> changes in the main patch. Instead, I have attached it as an
> incremental patch to be applied on the main v36 patch. The incremental
> patch is not yet quite polished, and quite a bit of cosmetic changes
> might be required, plus testing. But am posting it in case I have some
> early feedback.

I have now embedded the above incremental patch changes into the main
patch (v37) , which is attached.

Because it is used heavily in case of transition tables with
partitions, I have made TupConvMapForLeaf() a macro. And the actual
creation of the map is in separate function CreateTupConvMapForLeaf(),
so as to reduce the macro size.

Retained child_parent_map_not_required as a bool array, as against a bitmap.

To include one scenario related to on-demand map allocation that was
not getting covered with the update.sql test, I added one more
scenario in that file :
+-- Case where per-partition tuple conversion map array is allocated, but the
+-- map is not required for the particular tuple that is routed, thanks to
+-- matching table attributes of the partition and the target table.

--
Thanks,
-Amit Khandekar
EnterpriseDB Corporation
The Postgres Database Company

Attachment Content-Type Size
update-partition-key_v37.patch application/octet-stream 126.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Khandekar 2018-01-16 10:42:48 Re: [HACKERS] UPDATE of partition key
Previous Message Giuseppe Broccolo 2018-01-16 10:17:51 Re: Setting BLCKSZ 4kB