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.