Re: Add a missing comment for PGPROC.pgprocno

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add a missing comment for PGPROC.pgprocno
Date: 2022-10-11 17:08:31
Message-ID: Y0WjDwIOG69XBlqJ@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 8, 2022 at 08:16:07PM +0300, Aleksander Alekseev wrote:
> Hi hackers,
>
> I tried to understand some implementation details of ProcArray and
> discovered that this is a bit challenging to do due to a missing
> comment for PGPROC.pgprocno. E.g. it's hard to understand why
> ProcArrayAdd() preserves procArray->pgprocnos[] sorted by (PGPROC *)
> if actually the sorting is done by pgprocno. Took me some time to
> figure this out.
>
> Here is the patch that fixes this. Hopefully this will save some time
> for the newcomers.

Thanks, patch applied to master.

--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com

Indecision is a decision. Inaction is an action. Mark Batterson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2022-10-11 17:15:05 Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Previous Message Bruce Momjian 2022-10-11 17:00:36 Re: Clarifying docs on nuance of select and update policies