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