On Fri, Nov 4, 2011 at 4:13 AM, Simon Riggs <si...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers