设为首页 加入收藏

TOP

PostgreSQL启动过程中的那些事七:初始化共享内存和信号:四 shmem中初始化subtrans(二)
2014-11-24 08:11:56 来源: 作者: 【 】 浏览:3
Tags:PostgreSQL 启动 过程 那些 初始 共享 内存 信号 shmem subtrans
ount[slotno]= ++cur_lru_count;

* The oldest page is therefore the one withthe highest value of

* cur_lru_count- page_lru_count[slotno]

* The counts will eventually wrap around, butthis calculation still

* works as long as no page's age exceedsINT_MAX counts.

*----------

*/

int cur_lru_count;

/*

* latest_page_number is the page number of thecurrent end of the log;

* this is not critical data, since we use itonly to avoid swapping out

* the latest page.

*/

int latest_page_number;

} SlruSharedData;

typedef SlruSharedData *SlruShared;

下面看看初始化完" SUBTRANS Ctl"相关结构后在内存中的结构图

\

初始化完SUBTRANS相关结构的内存结构图

为了精简上图,把创建shmem的哈希表索引"ShmemIndex"时创建的HCTL结构删掉了,这个结构的作用是记录创建可扩展哈希表的相关信息。增加了左边灰色底的部分,描述共享内存/shmem里各变量物理布局概览,由下往上,由低地址到高地址。其中的"SUBTRANSCtl"即clog的相关结构图下面分别给出,要不上面的图太大太复杂了。

\

SUBTRANS相关结构图

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇hive sequencefile和rcfile效率对.. 下一篇解决Error: Can't create/wri..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·MySQL 基础入门视频 (2025-12-26 23:20:22)
·小白入门:MySQL超详 (2025-12-26 23:20:19)
·关于 MySQL 数据库学 (2025-12-26 23:20:16)
·SOLVED: Ubuntu 24.0 (2025-12-26 22:51:53)
·Linux 常用命令最全 (2025-12-26 22:51:50)