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

postgresql的shared memory

发布时间:2020-12-13 17:56:30 所属栏目:百科 来源:网络整理
导读:postgresql是多进程的,这个 shared memory 就是多个进程中进行通信用的,是用共享内存实现的 在 storage/ipc/ipci.c 中的 void CreateSharedMemoryAndSemaphores(bool makePrivate,int port) 函数中 主要包括 shmem index table 类型是 hash table 在shared

postgresql是多进程的,这个 shared memory 就是多个进程中进行通信用的,是用共享内存实现的

在 storage/ipc/ipci.c 中的 void
CreateSharedMemoryAndSemaphores(bool makePrivate,int port) 函数中

主要包括

shmem index table 类型是 hash table

在shared memory 里面存了多个数据结构,通过名字查找该数据结构是不是已经存在,方便快速查找用的,下面的项,都在这个 hast table 中有一项

buffer pool 初始化是 8K * 4096

lock tables 类型是 hash table

PGPROC : Each backend has a PGPROC struct in shared memory

XLOG

CLOG

LWLocks

SUBTRANS

TwoPhase

MultiXact

LWLocks

SharedProcArray : Each backend has a PGPROC struct in shared memory

BackendStatus: Each live backend maintains a PgBackendStatus struct in shared memory
showing its current activity

Shared cache invalidation memory segment

PMSignalData

bgwriter-related shared memory

autovacuum-related shared memory

BTreeShmemSize

SyncScanShmemSize

(编辑:李大同)

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

    推荐文章
      热点阅读