Re: Fast COPY FROM based on batch insert

Поиск
Список
Период
Сортировка
От Andrey Lepikhov
Тема Re: Fast COPY FROM based on batch insert
Дата
Msg-id dd6f005d-6773-9335-ccba-8ff55db626a4@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Fast COPY FROM based on batch insert  (Ian Barwick <ian.barwick@enterprisedb.com>)
Список pgsql-hackers
On 11/7/2022 04:12, Ian Barwick wrote:
> On 09/07/2022 00:09, Andrey Lepikhov wrote:
>> On 8/7/2022 05:12, Ian Barwick wrote:
>>>      ERROR:  bind message supplies 0 parameters, but prepared 
>>> statement "pgsql_fdw_prep_178" requires 6
>>>      CONTEXT:  remote SQL command: INSERT INTO public.foo_part_1(t, 
>>> v1, v2, v3, v4, v5) VALUES ($1, $2, $3, $4, $5, $6)
>>>      COPY foo, line 88160
>> Thanks, I got it. MultiInsertBuffer are created on the first non-zero 
>> flush of tuples into the partition and isn't deleted from the buffers 
>> list until the end of COPY. And on a subsequent flush in the case of 
>> empty buffer we catch the error.
>> Your fix is correct, but I want to propose slightly different change 
>> (see in attachment).
> 
> LGTM.
New version (with aforementioned changes) is attached.

-- 
regards,
Andrey Lepikhov
Postgres Professional
Вложения

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

Предыдущее
От: "Joseph D Wagner"
Дата:
Сообщение: proposal: Allocate work_mem From Pool
Следующее
От: John Naylor
Дата:
Сообщение: Re: [PATCH] Optimize json_lex_string by batching character copying