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进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
👍
2年前

评论
有用
2年前

评论
您好,您的文章已入选合格奖,10墨值奖励已经到账请查收!
❤️我们还会实时派发您的流量收益。
3年前

评论
相关阅读
外国CTO也感兴趣的开源数据库项目——openHalo
小满未满、
1986次阅读
2025-04-21 16:58:09
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
382次阅读
2025-04-15 14:48:05
QPlus V6.3 更新,新增PostgreSQL与PolarDB PG支持,OceanBase 容灾管理重磅上线
沃趣科技
204次阅读
2025-05-13 09:39:27
4月“墨力原创作者计划”获奖名单公布!
墨天轮编辑部
192次阅读
2025-05-13 16:21:59
中国PostgreSQL培训认证体系新增PGAI应用工程师方向
开源软件联盟PostgreSQL分会
191次阅读
2025-05-06 10:21:13
华象新闻 | PostgreSQL 18 Beta 1、17.5、16.9、15.13、14.18、13.21 发布
严少安
169次阅读
2025-05-09 11:34:10
PG生态赢得资本市场青睐:Databricks收购Neon,Supabase融资两亿美元,微软财报点名PG
老冯云数
160次阅读
2025-05-07 10:06:22
SQL 优化之 OR 子句改写
xiongcc
148次阅读
2025-04-21 00:08:06
告别老旧mysql_fdw,升级正当时
NickYoung
128次阅读
2025-04-29 11:15:18
PostgreSQL中文社区亮相于第八届数字中国峰会
PostgreSQL中文社区
118次阅读
2025-05-07 10:06:20