PostgreSQL參數(shù)—checkpoint_timeout
PostgreSQL參數(shù)—checkpoint_timeout
參數(shù)說明
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=#
| 參數(shù)名 | checkpoint_timeout |
|---|---|
| 當前設(shè)置值 | 300 |
| 默認值 | 300 |
| 單位 | 秒(S) |
| 參數(shù)類別 | 提前寫入日志/檢查點 |
| 參數(shù)描述 | 設(shè)置自動WAL檢查點之間的最長時間。 |
| context | sighup |
| 數(shù)據(jù)類型 | integer |
| 取值范圍 | 30 ~~ 86400 |
注1:postgresql.conf無需重新啟動服務(wù)器即可更改這些設(shè)置。向 postmaster發(fā)送SIGHUP信號,使其重新讀取postgresql.conf并應(yīng)用更改。postmaster 還會將SIGHUP信號轉(zhuǎn)發(fā)給它的子進程,以便它們都獲得新值。
參數(shù)設(shè)置
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=#
參數(shù)含義
系統(tǒng)自動執(zhí)行checkpoint之間的最大時間間隔,同樣間隔越大介質(zhì)恢復(fù)的時間越長。系統(tǒng)默認值是5分鐘。
「喜歡這篇文章,您的關(guān)注和贊賞是給作者最好的鼓勵」
關(guān)注作者
【版權(quán)聲明】本文為墨天輪用戶原創(chuàng)內(nèi)容,轉(zhuǎn)載時必須標注文章的來源(墨天輪),文章鏈接,文章作者等基本信息,否則作者和墨天輪有權(quán)追究責任。如果您發(fā)現(xiàn)墨天輪中有涉嫌抄襲或者侵權(quán)的內(nèi)容,歡迎發(fā)送郵件至:contact@modb.pro進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,墨天輪將立刻刪除相關(guān)內(nèi)容。




