简体   繁体   中英

How to avoid a big log file with WAL archiving?

I enabled WAL archiving in EDB Postgresql 9.6 for PITR, but now every time a 16MB log file is created and filling Disk volume. How do I avoid that?

These are the changes made to Postgresql.conf to enable the wal archive:

wal_level = replica
archive_mode =  on
archive_command = 'cp %p /postgres/cluster/wals/%f'

(cp from pg_xlogs to wals folder)

Now the wal folder is filling every time.

You avoid filling up the destination directory by

  • providing enough disk space there

  • deleting WAL archives you don't need any more.

PostgreSQL does not automatically delete WAL archives for you — it does not even know where they are.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM