CommitDelay performance improvement
От | Tom Lane |
---|---|
Тема | CommitDelay performance improvement |
Дата | |
Msg-id | 28338.982945941@sss.pgh.pa.us обсуждение исходный текст |
Ответы |
Re: CommitDelay performance improvement
Re: CommitDelay performance improvement Re: CommitDelay performance improvement |
Список | pgsql-hackers |
Looking at the XLOG stuff, I notice that we already have a field (logRec) in the per-backend PROC structures that shows whether a transaction is currently in progress with at least one change made (ie at least one XLOG entry written). It would be very easy to extend the existing code so that the commit delay is not done unless there is at least one other backend with nonzero logRec --- or, more generally, at least N other backends with nonzero logRec. We cannot tell if any of them are actually nearing their commits, but this seems better than just blindly waiting. Larger values of N would presumably improve the odds that at least one of them is nearing its commit. A further refinement, still quite cheap to implement since the info is in the PROC struct, would be to not count backends that are blocked waiting for locks. These guys are less likely to be ready to commit in the next few milliseconds than the guys who are actively running; indeed they cannot commit until someone else has committed/aborted to release the lock they need. Comments? What should the threshold N be ... or do we need to make that a tunable parameter? regards, tom lane
В списке pgsql-hackers по дате отправления: