forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit45e191e
committed
Improve scalability of md.c for large relations.
So far md.c used a linked list of segments. That proved to be a problemwhen processing large relations, because every smgr.c/md.c level accessto a page incurred walking through a linked list of all precedingsegments. Thus making accessing pages O(#segments).Replace the linked list of segments hanging off SMgrRelationData with anarray of opened segments. That allows O(1) access to individualsegments, if they've previously been opened.Discussion: <20140331101001.GE13135@alap3.anarazel.de>Reviewed-By: Peter Geoghegan, Tom Lane (in an older version)1 parent417fefa commit45e191e