Re: Storing hot members of PGPROC out of the band - Mailing list pgsql-hackers

From Pavan Deolasee
Subject Re: Storing hot members of PGPROC out of the band
Date
Msg-id CABOikdPSAycvL8TLbG2rg9hXNmzXitxgMjTJYVZdNqeb2MAKVA@mail.gmail.com
Whole thread Raw
In response to Re: Storing hot members of PGPROC out of the band  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Fri, Nov 4, 2011 at 4:13 AM, Simon Riggs <simon@2ndquadrant.com> wrote:

>
> If you look at your PGPROC_MINIMAL, its mostly transaction related
> stuff, so I would rename it PGXACT or similar.

Yeah, that looks good too. Though I am not sure if all fields are
related to transaction state and whether we would need to add more
fields to the structure in future. Having a general name might help in
that case.

> Not sure why you talk
> about pointer math, seems easy enough just to have two arrays
> protected by one lock, and have each proc use the same offset in both
> arrays.
>

Right now we store PGPROC pointers in the ProcArray and the pointer
math gets us the index to look into the other array. But we can
actually just store indexes in the ProcArray to avoid that. A positive
index may mean offset into the normal PGPROC array and a negative
index can be used to get dummy PGPROC from the prepared transactions.

Thanks,
Pavan


pgsql-hackers by date:

Previous
From: J Smith
Date:
Subject: Re: unaccent extension missing some accents
Next
From: Gregg Jaskiewicz
Date:
Subject: git trunk doesn't build