PostgreSQL keeps WAL segments not required by any replication slot - Mailing list pgsql-admin

From Andrey Zhidenkov
Subject PostgreSQL keeps WAL segments not required by any replication slot
Date
Msg-id CAJw4d1UCqk1t5BzJKjw-9oZ+rQ8o=EPwRKwqsLBA74rWA1N11g@mail.gmail.com
Whole thread Raw
List pgsql-admin
I have wal_keep_segments set to 3000. But directory pg_xlog contains
more than 6000 WAL segments. Interesting thing that there are ~ 3000
files dated after Aug 14, so files dated before Aug 14 should not be
exists, I guess. Also these files have an executable bit set.

$ ls -al pg_xlog | grep -A2 -B2 00000001000034DB0000003B
-rwx------  1 postgres postgres 16777216 Jul 19 07:58 00000001000034DB00000039
-rwx------  1 postgres postgres 16777216 Jul 19 07:58 00000001000034DB0000003A
-rwx------  1 postgres postgres 16777216 Jul 19 07:58 00000001000034DB0000003B
-rw-------  1 postgres postgres 16777216 Aug 14 19:17 0000000100003826000000EA
-rw-------  1 postgres postgres 16777216 Aug 14 19:17 0000000100003826000000EB

```

This cluster has no replication slots, archive_mode is enabled but
archive_command is set to /bin/true. I think the new WAL segments are
recycled and total amount is about 6000 but postgres does not delete
the old files for some reason. Any ideas?

--
With best regards, Andrey Zhidenkov.


pgsql-admin by date:

Previous
From: Tim Cross
Date:
Subject: Re: How to revoke privileged from PostgreSQL's superuser
Next
From: Andrew Kerber
Date:
Subject: Re: increase insert into local table from remote oracle table preformance