Re: Fdw batch insert error out when set batch_size > 65535

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: Fdw batch insert error out when set batch_size > 65535
Дата
Msg-id fe6cea83-b378-dce0-0506-03ff9a1a581d@enterprisedb.com
обсуждение исходный текст
Ответ на RE: Fdw batch insert error out when set batch_size > 65535  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Ответы Re: Fdw batch insert error out when set batch_size > 65535
Список pgsql-hackers
Hi,

I took at this patch today. I did some minor changes, mostly:

1) change the code limiting batch_size from

    if (fmstate->p_nums > 0 &&
       (batch_size * fmstate->p_nums > PQ_QUERY_PARAM_MAX_LIMIT))
    {
        batch_size = PQ_QUERY_PARAM_MAX_LIMIT / fmstate->p_nums;
    }

to

    if (fmstate && fmstate->p_nums > 0)
        batch_size = Min(batch_size,
                         PQ_QUERY_PARAM_MAX_LIMIT / fmstate->p_nums);

which I think is somewhat clearer / more common patter.


2) I've reworded the docs a bit, splitting the single para into two. I
think this makes it clearer.


Attached is a patch doing this. Please check the commit message etc.
Barring objections I'll get it committed in a couple days.



regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Reducing memory consumption for pending inval messages
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: list of extended statistics on psql (\dX)