Re: Storing hot members of PGPROC out of the band

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Storing hot members of PGPROC out of the band
Date: 2011-11-07 10:53:12
Message-ID: CABOikdPSAycvL8TLbG2rg9hXNmzXitxgMjTJYVZdNqeb2MAKVA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 4, 2011 at 4:13 AM, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregg Jaskiewicz 2011-11-07 11:14:41 git trunk doesn't build
Previous Message J Smith 2011-11-07 05:52:42 Re: unaccent extension missing some accents