微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

POSTGRESQL Shared Buffer Cache

Postgresql不直接在硬盘上修改数据,它先把数据读到Postgresql共享内存缓冲区中,Postgresql后端在共享内存缓冲区中对数据读/写后,再把它们放回硬盘。 Backends that need to access tables first look for needed blocks in this cache. If they are already there,they can continue processing right away. If not,an operating system request is made to load the blocks. The blocks are loaded either from the kernel disk buffer cache,or from disk. These can be expensive operations. Postgresql认设置分配了64个共享缓冲区,每个缓冲区8k,增加缓冲区的数目使数据库后端更有可能在缓存中找到它们需要的信息,这避免了使用代价更高的系统请求。可以通过修改postmaster命令的一个参数或者postgresql.conf配置文件中的shared_buffers这一项来更改共享缓冲区数目。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐