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

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use array as object (src/fe_utils/parallel_slot.c)
Date: 2022-08-19 18:52:36
Message-ID: CAEudQAoMaba5HtQ6xbRoWH-Ege2REmaxEk4dicEEP7bCPuO8ZQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em qui., 11 de ago. de 2022 às 09:52, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
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, which at the very least would be suspicious.
>
The commit
https://github.com/postgres/postgres/commit/f71519e545a34ece0a27c8bb1a2b6e197d323163
Introduced the affected function.
I'm not sure you're having problems, but using arrays as single pointer is
not recommended.

regards,
Ranier Vilela

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2022-08-19 19:22:32 Re: Use array as object (src/fe_utils/parallel_slot.c)
Previous Message mahendrakar s 2022-08-19 18:35:50 Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory