Re: Oddity in tuple routing for foreign partitions - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: Oddity in tuple routing for foreign partitions
Date
Msg-id 5AE14A59.80304@lab.ntt.co.jp
Whole thread Raw
In response to Re: Oddity in tuple routing for foreign partitions  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers
(2018/04/25 17:51), Etsuro Fujita wrote:
> (2018/04/25 4:49), Robert Haas wrote:
>> I didn't really get beyond the refactoring stage with this today.
>> This version still seems to work, but I don't really understand the
>> logic in postgresBeginForeignInsert which decides whether to use the
>> RTE from the range table or create our own. We seem to need to do one
>> sometimes and the other sometimes, but I don't know why that is,
>> really. Nor do I understand why we need the other changes in the
>> patch. There's probably a good reason, but I haven't figured it out
>> yet.
>
> To reduce the cost of creating RTEs, the original patch uses the RTE in
> the range table if the partition is an UPDATE subplan partition.

One thing to add: in addition to that case, the original patch uses the 
RTE in the range table if the foreign table is the target specified in a 
COPY command.

Best regards,
Etsuro Fujita


pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: jitflags in _outPlannedStmt and _readPlannedStmt treated as bool type
Next
From: Etsuro Fujita
Date:
Subject: Re: Oddity in tuple routing for foreign partitions