-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce critical section on inserts #150
Comments
Could this be at play in #221? |
after reading a few postgres source code and documentations, However, I couldn't see any performance improvement in this modified code during the concurrent insertion. postgres is just not using the lantern extension concurrently the python script for concurrent insertion(modified using Varik's https://gist.github.com/var77/dbf9b8c9845356d51a5588f6c7020cd1) some primitive benchmark results: Concurrent insertion (4 concurrent insertion tasks) After critical section shorten: Concurrent insertion (4 concurrent insertion tasks): my data set: there is something I am missing here |
You have to be careful here, as the header must remain under lock as long as there is a chance we will modify it. I think there still is lock contention around modifying blockmap pages. Consecutive inserts will try to modify consecutive blockmap pages resulting in lock contention similar to the one you removed in the diff above. I have not looked into optimizing those since the whole concept of blockmaps will go away in a future release. |
I was under the impression that the header is also a log structure, I guess this was wrong. |
Thanks so much for looking into this, though! re: blockmaps: |
I actually don't have access to this diagram haha, that's fine |
Currently we hold a lock on the header page of the index for much much longer than necessary on insertions.
The text was updated successfully, but these errors were encountered: