加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

POSTGRESQL Shared Buffer Cache

发布时间:2020-12-13 18:01:32 所属栏目:百科 来源:网络整理
导读:PostgreSQL不直接在硬盘上修改数据,它先把数据读到PostgreSQL共享内存缓冲区中,PostgreSQL后端在共享内存缓冲区中对数据读/写后,再把它们放回硬盘。 Backends that need to access tables first look for needed blocks in this cache. If they are alread
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这一项来更改共享缓冲区数目。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读