- Notifications
You must be signed in to change notification settings - Fork5
Commitbe86e3d
committed
Rethink checkpointer's fsync-request table representation.
Instead of having one hash table entry per relation/fork/segment, just haveone per relation, and use bitmapsets to represent which specific segmentsneed to be fsync'd. This eliminates the need to scan the whole hash tableto implement FORGET_RELATION_FSYNC, which fixes the O(N^2) behaviorrecently demonstrated by Jeff Janes for cases involving lots of TRUNCATE orDROP TABLE operations during a single checkpoint cycle. Per an idea fromRobert Haas.(FORGET_DATABASE_FSYNC still sucks, but since dropping a database is apretty expensive operation anyway, we'll live with that.)In passing, improve the delayed-unlink code: remove the pass over the listin mdpreckpt, since it wasn't doing anything for us except supporting auseless Assert in mdpostckpt, and fix mdpostckpt so that it will absorbfsync requests every so often when clearing a large backlog of deletionrequests.1 parent3072b7b commitbe86e3d
1 file changed
+256
-181
lines changed0 commit comments
Comments
(0)