Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group