PG11開啓WAL歸檔

-建立歸檔目錄sql

mkdir -p $PGDATA/archive_wals
chown -R postgres.postgres $PGDATA/archive_wals

 

-修改參數(在配置文件中配置)數據庫

wal_level='replica';
archive_mode='on'
archive_command ='cp %p /pgdata/11/archive_wals/%f';

若是隻是設置修改archive_command,可使用reload使其生效,而不用重啓數據庫post

 

-重啓數據庫rest

systemctl restart postgresql-11
相關文章
相關標籤/搜索