Re: [POC] Fast COPY FROM command for the table with foreign partitions
От | Zhihong Yu |
---|---|
Тема | Re: [POC] Fast COPY FROM command for the table with foreign partitions |
Дата | |
Msg-id | CALNJ-vSvDfpuoZfOgkP+=6eAwn6VPFAARhPT_aW6HAhK63NC9Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [POC] Fast COPY FROM command for the table with foreign partitions (Andrey Lepikhov <a.lepikhov@postgrespro.ru>) |
Список | pgsql-hackers |
On Thu, Apr 8, 2021 at 5:49 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
I rebased this patch to resolve a trivial 1 line conflict from c5b7ba4e6.
--
Justin
Hi,
In src/backend/commands/copyfrom.c :
+ if (resultRelInfo->ri_RelationDesc->rd_rel->relkind == RELKIND_FOREIGN_TABLE)
There are a few steps of indirection. Adding assertion before the if statement on resultRelInfo->ri_RelationDesc, etc would help catch potential invalid pointer.
+CopyToStart(CopyToState cstate)
...
+CopyToFinish(CopyToState cstate)
Since 'copy to' is the action, it would be easier to read the method names if they're called StartCopyTo, FinishCopyTo, respectively.
That way, the method names would be consistent with existing ones, such as:
extern uint64 DoCopyTo(CopyToState cstate);
+ * If a partition's root parent isn't allowed to use it, neither is the
In the above sentence, 'it' refers to multi insert. It would be more readable to explicitly mention 'multi insert' instead of 'it'
Cheers
В списке pgsql-hackers по дате отправления: