postgressql——ReadBuffer_common函数(7)

PostgreSQL中ReadBuffer_common函数

数据结构

BufferDesc
共享缓冲区的共享描述符(状态)数据

typedef struct BufferDesc
{
    //buffer tag
    BufferTag   tag;            /* ID of page contained in buffer */
    //buffer索引编号(0开始)
    int         buf_id;         /* buffer's index number (from 0) */
    /* state of the tag, containing flags, refcount and usagecount */
    //tag状态,包括flags/refcount和usagecount
    pg_atomic_uint32 state;
    //pin-count等待进程ID
    int         wait_backend_pid;   /* backend PID of pin-count waiter */
    //空闲链表链中下一个空闲的buffer
    int         freeNext;       /* link in freelist chain */
    //缓冲区内容锁
    LWLock      content_lock;   /* to lock access to buffer contents */
} BufferDesc;

BufferTag
Buffer tag标记了buffer存储的是磁盘中哪个block

typedef struct buftag
{
    //物理relation标识符
    RelFileNode rnode;          /* physical relation identifier */
    ForkNu

相关推荐

  1. 7.3 lambda函数

    2024-06-07 22:20:03       57 阅读
  2. 7 - 函数式编程

    2024-06-07 22:20:03       29 阅读
  3. mysql 5.7 函数汇总

    2024-06-07 22:20:03       62 阅读
  4. 7.手写call函数

    2024-06-07 22:20:03       54 阅读
  5. Python基础入门 --- 7.函数

    2024-06-07 22:20:03       45 阅读
  6. postgressql——ReadBuffer_common函数7

    2024-06-07 22:20:03       28 阅读
  7. c语言(函数7.18)

    2024-06-07 22:20:03       28 阅读
  8. Mysql5.7版本实现窗口函数

    2024-06-07 22:20:03       51 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-06-07 22:20:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-06-07 22:20:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-06-07 22:20:03       82 阅读
  4. Python语言-面向对象

    2024-06-07 22:20:03       91 阅读

热门阅读

  1. MySQL优化器的SQL重写规则

    2024-06-07 22:20:03       30 阅读
  2. 前端js解析websocket推送的gzip压缩json的Blob数据

    2024-06-07 22:20:03       36 阅读
  3. C语言实现三角波生成

    2024-06-07 22:20:03       25 阅读
  4. css 清除伪类active,hover效果

    2024-06-07 22:20:03       27 阅读
  5. SHELL脚本学习(五)用户输入

    2024-06-07 22:20:03       31 阅读
  6. Python | 排队取奶茶

    2024-06-07 22:20:03       34 阅读