简体   繁体   中英

pg_wal directory is full in postgres db

I have postgres 10 where pg_wal is getting full. I have files pg_wal directory from Dec'2020. I have enabled "archive" but I was getting archiver error and my application stopped working. Since this issue is on Production, I have disabled the archive.

Is it safe to remove old files from pg_wal which is dated on Dec'2020 and Jan'2021?

No. Never manually remove files.

If you set archive_mode to off (and restart) or change archive_command to something like /bin/true (and reload), then PostgreSQL will start deleting old WAL segments all by itself. Just give it a little time.

If that alone doesn't do the trick, there must be something else that blocks removing WAL segments, like a stale replication slot.

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