Centos

PostgreSQL:伺服器上的 WAL 文件沒有被刪除

  • November 18, 2020

以前,伺服器被配置為 hot_standby master。過了一會兒,他開始獨自工作。我根據它更改了設置,但是 WAL 文件的數量仍在增長…

如何擺脫它?

作業系統-CentOS

postgresql.conf:

listen_addresses = '192.168.1.24,localhost'     
max_connections = 100           
shared_buffers = 32MB           
wal_level = minimal         
archive_mode = off      
archive_command = 'test ! -f /var/lib/pgsql/docsrv/pgarch/%f && cp %p /var/lib/pgsql/docsrv/pgarch/%f'      
max_wal_senders = 1     
log_destination = 'syslog'
log_timezone = 'Europe/Samara'
update_process_title = off
datestyle = 'iso, mdy'
timezone = 'Europe/Samara'
lc_messages = 'C'           
lc_monetary = 'C'           
lc_numeric = 'C'            
lc_time = 'C'               
default_text_search_config = 'pg_catalog.english'

更改設置後是否重新啟動?嘗試

show wal_level;

show archive_mode;

在 psql 提示符下

並嘗試

show config_file;

查看伺服器使用了哪個配置文件

引用自:https://serverfault.com/questions/561471