BUG #16523: The wal logs fill the disk and are not cleaned up

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: abcxiaod(at)126(dot)com
Subject: BUG #16523: The wal logs fill the disk and are not cleaned up
Date: 2020-07-02 03:16:27
Message-ID: 16523-54d643065961bc4d@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 16523
Logged by: yi Ding
Email address: abcxiaod(at)126(dot)com
PostgreSQL version: 10.13
Operating system: linux
Description:

Assuming that the current wal log's logseq is 00000008 and wal_keep_segments
is 2, then wal logs before [all timelines + logid + 00000006] will be
recycled
In some cases:,The database restarts repeatedly, resulting in many wal logs
with different timelines which their segment numbers are all 00000007. In
this case, even if the size of the wal logs are very large and exceed the
max_wal_size, they will not be cleaned up.

-rw------- 1 postgres postgres 1.9K Jun 29 10:31 0000002D.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 0000002D0000000000000007
-rw------- 1 postgres postgres 2.0K Jun 29 10:31 0000002E.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 0000002E0000000000000007
-rw------- 1 postgres postgres 2.0K Jun 29 10:31 0000002F.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 0000002F0000000000000007
-rw------- 1 postgres postgres 2.1K Jun 29 10:31 00000030.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 000000300000000000000007
-rw------- 1 postgres postgres 2.1K Jun 29 10:31 00000031.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 000000310000000000000007
-rw------- 1 postgres postgres 2.1K Jun 29 10:31 00000032.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 000000320000000000000007
-rw------- 1 postgres postgres 2.2K Jun 29 10:31 00000033.history

Actual environment:
[postgres(at)3cf842e4-4f8b-4d26-a123-4cb94dd2369f-pgsrv-1 ~]$ du -sh
/pg_xlog/
9.8G /pg_xlog/
-rw------- 1 postgres postgres 1.9K Jun 29 10:31 0000002D.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 0000002D000000000000001A
-rw------- 1 postgres postgres 2.0K Jun 29 10:31 0000002E.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 0000002E000000000000001A
-rw------- 1 postgres postgres 2.0K Jun 29 10:31 0000002F.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 0000002F000000000000001A
-rw------- 1 postgres postgres 2.1K Jun 29 10:31 00000030.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 00000030000000000000001A
-rw------- 1 postgres postgres 2.1K Jun 29 10:31 00000031.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 00000031000000000000001A
-rw------- 1 postgres postgres 2.1K Jun 29 10:31 00000032.history
-rw------- 1 postgres postgres 64M Jun 29 10:31 00000032000000000000001A
-rw------- 1 postgres postgres 2.2K Jun 29 10:31 00000033.history

postgres=# show max_wal_size;
max_wal_size
--------------
2GB
(1 row)

postgres=# show wal_keep_segments ;
wal_keep_segments
-------------------
40
(1 row)

Browse pgsql-bugs by date

  From Date Subject
Next Message Laurenz Albe 2020-07-02 09:33:05 Re: BUG #15615: pg_upgrade and vacuum_defer_cleanup_age
Previous Message Klaudie Willis 2020-07-01 17:16:07 Re: BUG #16521: n_distinct_inherited does not affect child partitions when set on main partition