Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply
Date
Msg-id CAPmGK15wkv1=2D2AHefdNcZJpt_d1qX-RW=738yvhyVSGUboTw@mail.gmail.com
Whole thread Raw
In response to Issue in postgres_fdw causing unnecessary wait for cancel request reply  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: Issue in postgres_fdw causing unnecessary wait for cancel request reply  (Fujii Masao <masao.fujii@oss.nttdata.com>)
List pgsql-hackers
Hi Fujii-san,

On Wed, Apr 12, 2023 at 3:36 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
> However, if PQgetCancel() returned NULL and no cancel request was issued,
> I found that postgres_fdw could still wait for the reply to
> the cancel request, causing unnecessary wait time with a 30 second timeout.

Good catch!

> Attached patch fixes this issue.

I am not 100% sure that it is a good idea to use the same error
message "could not send cancel request" for the PQgetCancel() and
PQcancel() cases, because they are different functions.  How about
"could not create PGcancel structure” or something like that, for the
former case, so we can distinguish the former error from the latter?

Best regards,
Etsuro Fujita



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Partial aggregates pushdown
Next
From: "Drouvot, Bertrand"
Date:
Subject: Re: Clean up hba.c of code freeing regexps