From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server? |
Date: | 2021-12-06 08:16:59 |
Message-ID: | 1c2db8d4-7327-9f34-f3fc-f43a40df9305@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
Attachment | Content-Type | Size |
---|---|---|
pgfdw_get_cleanup_result_v2.patch | text/plain | 4.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2021-12-06 08:17:54 | Re: stat() vs ERROR_DELETE_PENDING, round N + 1 |
Previous Message | Michael Paquier | 2021-12-06 08:09:27 | Re: Make pg_waldump report replication origin ID, LSN, and timestamp. |