Re: [HACKERS] Add support for tuple routing to foreign partitions
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: Stephen Frost <sfrost@snowman.net>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Maksim Milyutin <milyutinma@gmail.com>,
Robert Haas <robertmhaas@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Date: 2018-02-27T12:01:02Z
Lists: pgsql-hackers
Attachments
- postgres-fdw-refactoring-1.patch (text/x-diff) patch
- foreign-routing-fdwapi-1.patch (text/x-diff) patch
(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
Commits
-
Allow insert and update tuple routing and COPY for foreign tables.
- 3d956d9562aa 11.0 landed
-
Refactor PgFdwModifyState creation/destruction into separate functions.
- 870d89608e5f 11.0 landed