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

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?
Дата
Msg-id CALj2ACUktE__O1a9J7E+dyGCDk=2RBKB3-fOArKipPJwcwmLjw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Список pgsql-hackers
On Mon, Nov 22, 2021 at 8:25 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
> On 2021/11/20 1:38, Bharath Rupireddy wrote:
> > It reports "remote SQL command: (cancel request)" which isn't a sql
> > query, but it looks okay to me as we report (cancel request). The
> > pgfdw_get_cleanup_result_v1 patch LGTM.
>
> BTW, we can hide the message "remote SQL command: .." in cancel request case,
> but which would make the debug and troubleshooting harder.

Yeah, let's not hide the message.

> So I decided to
> use the string "(cancel request)" as SQL command string. Probably what string
> should be used as SQL command might be debatable.

For a cancel request maybe we can just say without te errcontext:
                    ereport(WARNING,
                            (errmsg("could not get result of cancel
request due to timeout")));

See the below existing message using "cancel request":
                     errmsg("could not send cancel request: %s",

For SQL command we can say:
                    ereport(WARNING,
                            (errmsg("could not get query result due to
timeout"),
                             query ? errcontext("remote SQL command:
%s", query) : 0));

Regards,
Bharath Rupireddy.



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

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: issue in pgfdw_report_error()?
Следующее
От: Jeevan Ladhe
Дата:
Сообщение: Re: Teach pg_receivewal to use lz4 compression