Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?
Дата
Msg-id 1c2db8d4-7327-9f34-f3fc-f43a40df9305@oss.nttdata.com
обсуждение исходный текст
Ответ на Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers

On 2021/12/03 23:04, Bharath Rupireddy wrote:
> Let's not use the boolean just for the cancel request which isn't
> scalable IMO. Maybe a macro/enum?
> 
> Otherwise, we could just do, although it doesn't look elegant:
> 
> if (pgfdw_get_cleanup_result(conn, endtime, &result, "(cancel request)"))
> 
> if (strcmp(query, "(cancel request)") == 0)
>      WARNING without  "remote SQL command:
> else
>      WARNING with "remote SQL command:

Yeah, I agree that's not elegant..

So I'd like to propose new patch with different design from
what I proposed before. Patch attached.

This patch changes pgfdw_exec_cleanup_query() so that it tells
its callers the information about whether the timeout expired
or not. Then the callers (pgfdw_exec_cleanup_query and
pgfdw_cancel_query) report the warning messages based on
the results from pgfdw_exec_cleanup_query().

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Make pg_waldump report replication origin ID, LSN, and timestamp.
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: stat() vs ERROR_DELETE_PENDING, round N + 1