作者
digoal
日期
2020-08-03
标签
PostgreSQL , lseed , recovery效率
背景
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c5315f4f44843c20ada876fdb0d0828795dfbdf5
```
Cache smgrnblocks() results in recovery.
author Thomas Munro tmunro@postgresql.org
Fri, 31 Jul 2020 10:15:18 +0800 (14:15 +1200)
committer Thomas Munro tmunro@postgresql.org
Fri, 31 Jul 2020 10:29:52 +0800 (14:29 +1200)
commit c5315f4f44843c20ada876fdb0d0828795dfbdf5
tree b94c24609a31ae7243b217ae7d5358c8cff8fe20 tree | snapshot
parent e3931d01f3afef14703827eda1dad0a3fb3b5d07 commit | diff
Cache smgrnblocks() results in recovery.
Avoid repeatedly calling lseek(SEEK_END) during recovery by caching
the size of each fork. For now, we can't use the same technique in
other processes, because we lack a shared invalidation mechanism.
Do this by generalizing the pre-existing caching used by FSM and VM
to support all forks.
Discussion: https://postgr.es/m/CAEepm%3D3SSw-Ty1DFcK%3D1rU-K6GSzYzfdD4d%2BZwapdN7dTa6%3DnQ%40mail.gmail.com
```
通过缓存smgrnblocks() results降低恢复时lseek调用, 提高恢复速度.
PostgreSQL 许愿链接
您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.
9.9元购买3个月阿里云RDS PostgreSQL实例
PostgreSQL 解决方案集合
德哥 / digoal's github - 公益是一辈子的事.





