Robert Haas <robertmh...@gmail.com> writes: > On Tue, Jul 26, 2011 at 9:57 PM, Robert Haas <robertmh...@gmail.com> wrote: >> 1. Add a new flag to each procState called something like >> "timeToPayAttention". >> 2. Each call to SIGetDataEntries() iterates over all the ProcStates >> whose index is < lastBackend and sets stateP->timeToPayAttention = >> TRUE for each. >> 3. At the beginning of SIGetDataEntries(), we do an unlocked if >> (!stateP->timeToPayAttention) return 0. >> 4. Immediately following that if statement and before acquiring any >> locks, we set stateP->timeToPayAttention = FALSE.
> There turned out to be a little bit of further subtlety to this, but > it seems to work. Patch attached. And? It didn't sound to me like this could possibly be a performance win, but I await some numbers ... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers