Re: partition routing layering in nodeModifyTable.c

Amit Langote <amitlangote09@gmail.com>

From: Amit Langote <amitlangote09@gmail.com>
To: Etsuro Fujita <etsuro.fujita@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, Thomas Munro <thomas.munro@gmail.com>, David Rowley <david.rowley@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@2ndquadrant.com>, Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>, PostgreSQL-development <pgsql-hackers@postgresql.org>, amitdkhan.pg@gmail.com
Date: 2019-08-09T01:51:49Z
Lists: pgsql-hackers
Fujita-san,

On Thu, Aug 8, 2019 at 9:49 PM Etsuro Fujita <etsuro.fujita@gmail.com> wrote:
> On Thu, Aug 8, 2019 at 10:10 AM Amit Langote <amitlangote09@gmail.com> wrote:
> > Attached updated patches; only 0001 changed in this version.
>
> Thanks for the updated version, Amit-san!  I updated the 0001 patch a
> bit further:
>
> * Tweaked comments in plannodes.h, createplan.c, and nodeForeignscan.c.
> * Made cosmetic changes to postgres_fdw.c.
> * Adjusted doc changes a bit, mainly not to produce unnecessary diff.
> * Modified the commit message.
>
> Attached is an updated version of the 0001 patch.  Does that make sense?

Looks perfect, thank you.

Regards,
Amit



Commits

  1. Fix initialization of es_result_relations in EvalPlanQualStart().

  2. Remove PartitionRoutingInfo struct.

  3. Revise child-to-root tuple conversion map management.

  4. Clean up code to resolve the "root target relation" in nodeModifyTable.c

  5. Refactor code for cross-partition updates to a separate function.

  6. Remove es_result_relation_info from EState.

  7. Include result relation info in direct modify ForeignScan nodes.

  8. Create ResultRelInfos later in InitPlan, index them by RT index.