作者
digoal
日期
2021-03-16
标签
PostgreSQL , archiver , shared memory context , shared latch
背景
archiver 进程原来是一个独立进程, 现在加入到PG的辅助进程列表, 进程间通信采用共享内存机制, 不再需要通过给postmaster发信号来与archiver通信了.
同时PG 14马上会有一系列的 shared-memory based stats collector patch series 发布, 大幅度简化进程间通信, 进程状态收集相关.
pg_stat_activity中也能直接查询archiver进程监控数据了.
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=d75288fb27b8fe0a926aaab7d75816f091ecdc27
```
Make archiver process an auxiliary process.
author Fujii Masao fujii@postgresql.org
Mon, 15 Mar 2021 04:13:14 +0000 (13:13 +0900)
committer Fujii Masao fujii@postgresql.org
Mon, 15 Mar 2021 04:13:14 +0000 (13:13 +0900)
commit d75288fb27b8fe0a926aaab7d75816f091ecdc27
tree 80105f9cb25c71c14465d4f103ea885002d3f89f tree
parent 0ea71c93a06ddc38e0b72e48f1d512e5383a9c1b commit | diff
Make archiver process an auxiliary process.
This commit changes WAL archiver process so that it's treated as
an auxiliary process and can use shared memory. This is an infrastructure
patch required for upcoming shared-memory based stats collector patch
series. These patch series basically need any processes including archiver
that can report the statistics to access to shared memory. Since this patch
itself is useful to simplify the code and when users monitor the status of
archiver, it's committed separately in advance.
This commit simplifies the code for WAL archiving. For example, previously
backends need to signal to archiver via postmaster when they notify
archiver that there are some WAL files to archive. On the other hand,
this commit removes that signal to postmaster and enables backends to
notify archier directly using shared latch.
Also, as the side of this change, the information about archiver process
becomes viewable at pg_stat_activity view.
Author: Kyotaro Horiguchi
Reviewed-by: Andres Freund, Álvaro Herrera, Julien Rouhaud, Tomas Vondra, Arthur Zakirov, Fujii Masao
Discussion: https://postgr.es/m/20180629.173418.190173462.horiguchi.kyotaro@lab.ntt.co.jp
```
PostgreSQL 许愿链接
您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.
9.9元购买3个月阿里云RDS PostgreSQL实例
PostgreSQL 解决方案集合
德哥 / digoal's github - 公益是一辈子的事.





