Possibly redundant context switch in postgres_fdw

Поиск
Список
Период
Сортировка
От Ildar Musin
Тема Possibly redundant context switch in postgres_fdw
Дата
Msg-id CAONYFtNX4cg7-tvwBsaatMYhJOPb6jrNs_p0=apm0_tjw9jQ6g@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi hackers,

ISTM that context switch in `create_cursor()`:

if (numParams > 0)
{
MemoryContext oldcontext;
oldcontext = MemoryContextSwitchTo(econtext->ecxt_per_tuple_memory);
process_query_params(econtext,
fsstate->param_flinfo,
fsstate->param_exprs,
values);
MemoryContextSwitchTo(oldcontext);
}

is redundant since we should already be in `ecxt_per_tuple_memory` context according to `ForeignNext()`. Do I miss some hidden purpose? If not here is a patch that removes it.

Regards,
Ildar Musin
Вложения

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

Предыдущее
От: Alexander Kuzmenkov
Дата:
Сообщение: Re: Removing unneeded self joins
Следующее
От: Tom Lane
Дата:
Сообщение: Re: PG vs macOS Mojave