Re: Use array as object (src/fe_utils/parallel_slot.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Use array as object (src/fe_utils/parallel_slot.c)
Дата
Msg-id CAEudQArxKKaJENYohrbHP5KNV5WosiEVYDANFBXyjzk-pJ0cSQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Use array as object (src/fe_utils/parallel_slot.c)  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Use array as object (src/fe_utils/parallel_slot.c)  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Em dom., 21 de ago. de 2022 às 21:15, Michael Paquier <michael@paquier.xyz> escreveu:
On Fri, Aug 19, 2022 at 02:22:32PM -0500, Justin Pryzby wrote:
> If you trace the history back to a17923204, you'll see a comment about the
> "zeroth slot", which makes it clear that the first slot it what's intended.
>
> I agree that it would be clearer if this were written as slots[0].connection.

Based on the way the code is written on HEAD, this would be the
correct assumption.  Now, calling PQgetCancel() would return NULL for
a connection that we actually ignore in the code a couple of lines
above when it has PGINVALID_SOCKET.  So it seems to me that the
suggestion of using "cancelconn", which would be the first valid
connection, rather than always the first connection, which may be
using an invalid socket, is correct, so as we always have our hands
on a way to cancel a command.
Thanks Michael, for looking at this.
Is it worth creating a commiffest?

regards,
Ranier Vilela

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

Предыдущее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: SQL/JSON features for v15
Следующее
От: Robert Haas
Дата:
Сообщение: Re: pg_has_role's handling of ADMIN OPTION is pretty weird