Re: [EXTERNAL] Re: Add non-blocking version of PQcancel
От
Alvaro Herrera
Тема
Re: [EXTERNAL] Re: Add non-blocking version of PQcancel
Дата
Msg-id
202402041539.xv5n3pg2x57c@alvherre.pgsql
Ответ на
Re: [EXTERNAL] Re: Add non-blocking version of PQcancel (Jelte Fennema-Nio)
Список
Дерево обсуждения
Add non-blocking version of PQcancel Jelte Fennema <Jelte.Fennema@microsoft.com>
Re: Add non-blocking version of PQcancel Andres Freund <andres@anarazel.de>
Re: Add non-blocking version of PQcancel Jelte Fennema <Jelte.Fennema@microsoft.com>
Re: Add non-blocking version of PQcancel Jacob Champion <pchampion@vmware.com>
Re: Add non-blocking version of PQcancel Tom Lane <tgl@sss.pgh.pa.us>
Re: Add non-blocking version of PQcancel Andres Freund <andres@anarazel.de>
Re: Add non-blocking version of PQcancel Robert Haas <robertmhaas@gmail.com>
Re: Add non-blocking version of PQcancel Tom Lane <tgl@sss.pgh.pa.us>
Re: Add non-blocking version of PQcancel Robert Haas <robertmhaas@gmail.com>
Re: Add non-blocking version of PQcancel Tom Lane <tgl@sss.pgh.pa.us>
Re: [EXTERNAL] Re: Add non-blocking version of PQcancel Jelte Fennema <Jelte.Fennema@microsoft.com>
Re: Add non-blocking version of PQcancel Jelte Fennema <Jelte.Fennema@microsoft.com>
Re: Add non-blocking version of PQcancel Justin Pryzby <pryzby@telsasoft.com>
Re: Add non-blocking version of PQcancel Jelte Fennema <Jelte.Fennema@microsoft.com>
Re: Add non-blocking version of PQcancel Jelte Fennema <Jelte.Fennema@microsoft.com>
Re: Add non-blocking version of PQcancel Justin Pryzby <pryzby@telsasoft.com>
Re: Add non-blocking version of PQcancel Justin Pryzby <pryzby@telsasoft.com>
Re: Add non-blocking version of PQcancel Alvaro Herrera <alvherre@alvh.no-ip.org>
On 2024-Feb-02, Jelte Fennema-Nio wrote:
> The only reasonable thing I can think of to make that situation better
> is to move that part of the function outside of PQcancelPoll and
> create a dedicated PQcancelStart function for it. It introduces an
> extra function, but it does seem more in line with how we do the
> regular connection establishment. Basically you would have code like
> this then, which looks quite nice honestly:
>
> cancelConn = PQcancelConn(conn);
> if (!PQcancelStart(cancelConn))
> pg_fatal("bad cancel connection: %s", PQcancelErrorMessage(cancelConn));
> while (true)
> {
> // polling using PQcancelPoll here
> }
Maybe this is okay? I'll have a look at the whole final situation more
carefully later; or if somebody else wants to share an opinion, please
do so.
In the meantime I pushed your 0002 and 0003 patches, so you can take
this as an opportunity to rebase the remaining ones.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"The saddest aspect of life right now is that science gathers knowledge faster
than society gathers wisdom." (Isaac Asimov)
В списке pgsql-hackers по дате отправления