On Thu, Nov 3, 2011 at 6:12 PM, Pavan Deolasee <pavan.deola...@gmail.com> wrote:
> When PGPROC array is allocated, we also allocate another array of > PGPROC_MINIMAL structures of the same size. While accessing the > ProcArray, a simple pointer mathematic can get us the corresponding > PGPROC_MINIMAL structure. The only exception being the dummy PGPROC > for prepared transaction. A first cut version of the patch is > attached. It looks big, but most of the changes are cosmetic because > of added indirection. The patch also contains another change to keep > the ProcArray sorted by (PGPROC *) to preserve locality of references > while traversing the array. This is very good. If you look at your PGPROC_MINIMAL, its mostly transaction related stuff, so I would rename it PGXACT or similar. 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. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers