跳至正文
Wener Notes

pg_prewarm

约 1 分钟阅读
sql
CREATE EXTENSION pg_prewarm;
text
pg_prewarm(regclass, mode text default 'buffer', fork text default 'main',
           first_block int8 default null,
           last_block int8 default null) RETURNS int8

autoprewarm_start_worker() RETURNS void
autoprewarm_dump_now() RETURNS int8
  • mode
    • read
      • 同步读
    • buffer
      • 读到 buffer cache
    • prefetch
      • async os request
      • 需要系统支持

后台运行

postgresql.conf
shared_preload_libraries = 'pg_prewarm'

pg_prewarm.autoprewarm = true
pg_prewarm.autoprewarm_interval = 300s
  • autoprewarm.blocks

关联信息

反向链接、本文链接的其他页面和外部资料。

反向链接

  • 常见问题
    笔记 · pgprewarm

    Errors and Messages · SQL Key Words · case-sentivity of identifiers - 表、列、函数名 · 如果没有双引号,则不区分大小写,默认转换为小写 · https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYN...

参考资料

其他外链1 条
最近更新commit cb5a33c编辑