暂无图片
暂无图片
4
暂无图片
暂无图片
暂无图片

PostgreSQL参数—checkpoint_timeout

原创 李先生 2022-02-19
1439

PostgreSQL参数—checkpoint_timeout


PostgreSQL参数—checkpoint_timeout

参数说明

postgres=# show checkpoint_timeout; checkpoint_timeout -------------------- 5min (1 row) postgres=# \x Expanded display is on. postgres=# select * from pg_settings where name ='checkpoint_timeout'; -[ RECORD 1 ]---+--------------------------------------------------------- name | checkpoint_timeout setting | 300 unit | s category | Write-Ahead Log / Checkpoints short_desc | Sets the maximum time between automatic WAL checkpoints. extra_desc | context | sighup vartype | integer source | default min_val | 30 max_val | 86400 enumvals | boot_val | 300 reset_val | 300 sourcefile | sourceline | pending_restart | f postgres=#
参数名 checkpoint_timeout
当前设置值 300
默认值 300
单位 秒(S)
参数类别 提前写入日志/检查点
参数描述 设置自动WAL检查点之间的最长时间。
context sighup
数据类型 integer
取值范围 30 ~~ 86400

注1:postgresql.conf无需重新启动服务器即可更改这些设置。向 postmaster发送SIGHUP信号,使其重新读取postgresql.conf并应用更改。postmaster 还会将SIGHUP信号转发给它的子进程,以便它们都获得新值。

参数设置

postgres=# alter system set checkpoint_timeout = 600; ALTER SYSTEM postgres=# show checkpoint_timeout; checkpoint_timeout -------------------- 5min (1 row) postgres=# select pg_reload_conf(); pg_reload_conf ---------------- t (1 row) postgres=# show checkpoint_timeout; checkpoint_timeout -------------------- 10min (1 row) postgres=#

参数含义

系统自动执行checkpoint之间的最大时间间隔,同样间隔越大介质恢复的时间越长。系统默认值是5分钟。

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论