Re: [HACKERS] Add support for tuple routing to foreign partitions

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Maksim Milyutin <milyutinma(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Subject: Re: [HACKERS] Add support for tuple routing to foreign partitions
Date: 2018-02-27 12:01:02
Message-ID: 5A95487E.9050808@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2018/02/21 20:54), Etsuro Fujita wrote:
> void
> BeginForeignRouting();
>
> Prepare for a tuple-routing operation on a foreign table. This is called
> from ExecSetupPartitionTupleRouting and ExecInitPartitionInfo.

I modified execPartition.c so that this callback routine is called from
a single function that I added to execPartition.c and it is called the
first time the foreign partition is chose as the target partition to
route a tuple to. That removes CheckValidResultRel, the
tuple-conversion setup, and the FDW initialization for each UPDATE
subplan from ExecSetupPartitionTupleRouting, so it would minimize the
possibly-useless overhead in doing that function.

Changes other than that are:

* Fixed typo and revised code/comments
* Added more regression tests
* Added docs

Attached is a new version of the patch set.

Best regards,
Etsuro Fujita

Attachment Content-Type Size
postgres-fdw-refactoring-1.patch text/x-diff 18.2 KB
foreign-routing-fdwapi-1.patch text/x-diff 36.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2018-02-27 12:35:33 Re: MSVC builld of 9.5.12 is broken?
Previous Message Andreas Joseph Krogh 2018-02-27 11:25:24 Sv: Re: ERROR: Aggref found in non-Agg plan node (introducesd in commit 3bf05e096b9f8375e640c5d7996aa57efd7f240c)