Greg Smith <g...@2ndquadrant.com> writes: > I then posted the patch and added it to the January CF. Unbeknownst to > me until today, Simon had the same multi-year "this itches and I can't > make it stop" feel toward these parameters, and that's how it jumped the > standard process.
I think pretty much everybody who's looked at that code had the same feeling. If Simon hadn't taken it, I might have. Jignesh's explanation of what the actual usefulness of the code is finally made sense to me: the sleep calls effectively synchronize multiple nearby commits to happen at the next scheduler clock tick, and then whichever one grabs the WALWriteLock first does the work. If you've got a high enough commit volume that this is likely to be a win, then it's unclear that taking ProcArrayLock (even shared) to check for guys who might commit shortly is a net win. Moreover, it's likely that that heuristic will exclude the last-to-arrive process who otherwise could have participated in a group flush. I'm not entirely convinced that zero commit_siblings is a better default than small positive values, but it's certainly plausible. 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