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

Stephen Frost <sfrost@snowman.net>

From: Stephen Frost <sfrost@snowman.net>
To: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
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-01-25T14:33:38Z
Lists: pgsql-hackers
Etsuro,

* Etsuro Fujita (fujita.etsuro@lab.ntt.co.jp) wrote:
> (2017/12/18 23:25), Alvaro Herrera wrote:
> >InitResultRelInfo becomes unintelligible after this patch -- it was
> >straightforward but adding partition_root makes things shaky.  Please
> >add a proper comment indicating what each argument is.
> 
> I was thiking that the comment I added to the definition of the
> ResultRelInfo struct in execnodes.h would make that function intelligible,
> but I agree on that point.  Please fined attached a new version of the patch
> adding such comments.

I'm afraid a good bit of this patch is now failing to apply.  I don't
have much else to say except to echo the performance concern that Amit
Langote raised about expanding the inheritence tree twice.

Thanks!

Stephen

Commits

  1. Allow insert and update tuple routing and COPY for foreign tables.

  2. Refactor PgFdwModifyState creation/destruction into separate functions.