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

Ranier Vilela <ranier.vf@gmail.com>

From: Ranier Vilela <ranier.vf@gmail.com>
To: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2022-08-11T12:52:49Z
Lists: pgsql-hackers

Attachments

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, which at the very least would be suspicious.

cancelconn wouldn't that be the correct argument?

regards,
Ranier Vilela

Commits

  1. Use correct connection for cancellation in frontend's parallel slots

  2. Refactor and generalize the ParallelSlot machinery.