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

2022-11-03 Thread Tom Lane
Michael Paquier writes: > 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 >

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

2022-08-27 Thread Ranier Vilela
Em sáb., 27 de ago. de 2022 às 00:00, Michael Paquier escreveu: > On Fri, Aug 26, 2022 at 01:54:26PM -0300, Ranier Vilela wrote: > > Is it worth creating a commiffest? > > Don't think so, but feel free to create one and mark me as committer > if you think that's appropriate. I have marked this t

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

2022-08-26 Thread Michael Paquier
On Fri, Aug 26, 2022 at 01:54:26PM -0300, Ranier Vilela wrote: > Is it worth creating a commiffest? Don't think so, but feel free to create one and mark me as committer if you think that's appropriate. I have marked this thread as something to do soon-ishly, but I am being distracted by life this

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

2022-08-26 Thread Ranier Vilela
Em dom., 21 de ago. de 2022 às 21:15, Michael Paquier 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. > > >

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

2022-08-21 Thread Michael Paquier
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

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

2022-08-19 Thread Ranier Vilela
Em sex., 19 de ago. de 2022 às 16:22, Justin Pryzby escreveu: > On Fri, Aug 19, 2022 at 03:52:36PM -0300, Ranier Vilela wrote: > > Em qui., 11 de ago. de 2022 às 09:52, Ranier Vilela > escreveu: > > > > > Hi, > > > > > > One other case suspicious, which I think deserves a conference. > > > At fu

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

2022-08-19 Thread Justin Pryzby
On Fri, Aug 19, 2022 at 03:52:36PM -0300, Ranier Vilela wrote: > Em qui., 11 de ago. de 2022 às 09:52, Ranier Vilela > escreveu: > > > Hi, > > > > One other case suspicious, which I think deserves a conference. > > At function wait_on_slots (src/fe_utils/parallel_slot.c) > > The variable "slots"

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

2022-08-19 Thread Ranier Vilela
Em qui., 11 de ago. de 2022 às 09:52, Ranier Vilela escreveu: > Hi, > > One other case suspicious, which I think deserves a conference. > At function wait_on_slots (src/fe_utils/parallel_slot.c) > The variable "slots" are array, but at function call SetCancelConn, > "slots" are used as an object,