On 2018/01/19 18:50, Amit Khandekar wrote: > FYI ... > > For the pending update-partition-key patch, we would again require the > rel variable for UPDATE. So in the rebased update-partition-key patch > [1], 'rel' is assigned the root partitioned table. But this time, I > have used the already opened node->rootResultRelInfo to get the root > partitioned table, rather than opening it again. Details : [1] . Sorry > for not noticing this potential conflict earlier. Comments welcome. > > [1] : > https://www.postgresql.org/message-id/CAJ3gD9cpyM1L0vTrXzrggR%3Dt6MSZtuy_kge1kagMBi0TSKa_UQ%40mail.gmail.com
That's nice. Actually, the rootResultRelInfo field was introduced [1] after partitioned_rels [2] and the code that got removed with the patch that was committed should have gone much earlier. That is, when rootResultRelInfo was introduced, but then again as Fujita-san pointed out, there wasn't much point then (and now) to finding the root table's Relation pointer in some special place. But now we need to, for the update tuple routing case as you said. Thanks, Amit [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=e180c8aa8ca [2] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=d3cc37f1d801