Re: BUG #15402: Hot standby server with archive_mode=on keeps initial WAL segments
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: harukat@sraoss.co.jp, pgsql-bugs@lists.postgresql.org
Date: 2018-09-26T03:52:05Z
Lists: pgsql-bugs
On Wed, Sep 26, 2018 at 03:26:50AM +0000, PG Bug reporting form wrote: > A hot standby server with “archive_mode = on” keeps initial WAL segment > files that copied by pg_basebackup. It shows the following status. > 000000010000000000000042 will be kept forever in this case. How did you find yourself in this situation? Did you take a base backup from a primary which had .ready files in it, and those got copied to the standby's data folder? We may want to study the possibility of filtering things when taking a base backup instead. > Though I understand renaming the .ready to .done manually can clean it, > I would like to fix the server code like the following patch. > I'd appreciate if you would consider that. Your patch looks incorrect to me to begin with... What if archive_mode is switched from "on" to "always" back-and-forth and there some of the past segments which should be archived are not? -- Michael
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix WAL recycling on standbys depending on archive_mode
- ed9d6d621a09 9.5.15 landed
- f4fa92f267fa 9.6.11 landed
- 05b9c58da141 10.6 landed
- 88926fd481b7 11.0 landed
- 78ea8b5daab9 12.0 landed