Content-Length: 235731 | pFad | http://github.com/postgrespro/postgres/commit/be86e3dd5b42c33387ae976c014e6276c9439f7f

7D Rethink checkpointer's fsync-request table representation. · postgrespro/postgres@be86e3d · GitHub
Skip to content

Commit be86e3d

Browse files
committed
Rethink checkpointer's fsync-request table representation.
Instead of having one hash table entry per relation/fork/segment, just have one per relation, and use bitmapsets to represent which specific segments need to be fsync'd. This eliminates the need to scan the whole hash table to implement FORGET_RELATION_FSYNC, which fixes the O(N^2) behavior recently demonstrated by Jeff Janes for cases involving lots of TRUNCATE or DROP TABLE operations during a single checkpoint cycle. Per an idea from Robert Haas. (FORGET_DATABASE_FSYNC still sucks, but since dropping a database is a pretty expensive operation anyway, we'll live with that.) In passing, improve the delayed-unlink code: remove the pass over the list in mdpreckpt, since it wasn't doing anything for us except supporting a useless Assert in mdpostckpt, and fix mdpostckpt so that it will absorb fsync requests every so often when clearing a large backlog of deletion requests.
1 parent 3072b7b commit be86e3d

File tree

1 file changed

+256
-181
lines changed
  • src/backend/storage/smgr

1 file changed

+256
-181
lines changed

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/be86e3dd5b42c33387ae976c014e6276c9439f7f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy