Re: Optimization for updating foreign tables in Postgres FDW

Поиск
Список
Период
Сортировка
От Etsuro Fujita
Тема Re: Optimization for updating foreign tables in Postgres FDW
Дата
Msg-id 5715A9E3.9030207@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Optimization for updating foreign tables in Postgres FDW  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Optimization for updating foreign tables in Postgres FDW
Список pgsql-hackers
On 2016/04/19 12:26, Michael Paquier wrote:
> On Tue, Apr 19, 2016 at 12:16 PM, Noah Misch <noah@leadboat.com> wrote:
>> On Sat, Apr 16, 2016 at 08:59:40AM +0900, Michael Paquier wrote:

>>> Here is a new version. I just recalled that I forgot a PQclear() call
>>> to clean up results.

Thanks for updating the patch!

>> Robert, the deadline to fix this open item expired eleven days ago.  The
>> thread had been seeing regular activity, but it has now been quiet for three
>> days.  Do you have an updated plan for fixing this open item?

> Note for Robert: pgfdw_get_result copycats PQexec by discarding all
> PQresult received except the last one. I think that's fine for the
> purposes of postgres_fdw, but perhaps you have a different opinion on
> the matter.

That seemed reasonable to me, but sorry, on second thought, I'm not sure 
that's still a good idea.  One reason is (1) I think it's better for the 
in-postgres_fdw.c functions using pgfdw_get_result to verify that there 
are no more results, in itself.  I think that would improve the 
robustness of those functions.  Another reason is I don't think 
pgfdw_report_error, which is used in pgfdw_get_result, works well for 
cases where the query contains multiple SQL commands.  So, +1 for the 
idea of simply encapsulating the while (PQisBusy(...)) loop into a new 
function pgfdw_get_result().

Best regards,
Etsuro Fujita





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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Optimization for updating foreign tables in Postgres FDW
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add trigonometric functions that work in degrees.