RE: POC: postgres_fdw insert batching

Поиск
Список
Период
Сортировка
От tsunakawa.takay@fujitsu.com
Тема RE: POC: postgres_fdw insert batching
Дата
Msg-id TYAPR01MB2990BDB626DB2630E6CEA78AFEA70@TYAPR01MB2990.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: POC: postgres_fdw insert batching  (Amit Langote <amitlangote09@gmail.com>)
Ответы Re: POC: postgres_fdw insert batching  (Amit Langote <amitlangote09@gmail.com>)
Список pgsql-hackers
From: Amit Langote <amitlangote09@gmail.com>
> Okay, so maybe not moving the whole logic into the FDW's
> BeginForeignModify(), but at least if we move this...
> 
> @@ -441,6 +449,72 @@ ExecInsert(ModifyTableState *mtstate,
> +       /*
> +        * Determine if the FDW supports batch insert and determine the
> batch
> +        * size (a FDW may support batching, but it may be disabled for the
> +        * server/table). Do this only once, at the beginning - we don't want
> +        * the batch size to change during execution.
> +        */
> +       if (resultRelInfo->ri_FdwRoutine->GetForeignModifyBatchSize &&
> +           resultRelInfo->ri_FdwRoutine->ExecForeignBatchInsert &&
> +           resultRelInfo->ri_BatchSize == 0)
> +           resultRelInfo->ri_BatchSize =
> +
> resultRelInfo->ri_FdwRoutine->GetForeignModifyBatchSize(resultRelInfo);
> 
> ...into ExecInitModifyTable(), ExecInsert() only needs the following block:

Does ExecInitModifyTable() know all leaf partitions where the tuples produced by VALUES or SELECT go?  ExecInsert()
doesn'tfind the target leaf partition for the first time through the call to ExecPrepareTupleRouting()?  Leaf
partitionscan have different batch_size settings.
 


Regards
Takayuki Tsunakawa


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Álvaro Herrera
Дата:
Сообщение: Re: {CREATE INDEX, REINDEX} CONCURRENTLY improvements
Следующее
От: Amit Langote
Дата:
Сообщение: Re: POC: postgres_fdw insert batching