On 15 January 2018 at 16:11, Amit Khandekar <amitdkhan.pg@gmail.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