| From: | TAKATSUKA Haruka <harukat(at)sraoss(dot)co(dot)jp> | 
|---|---|
| To: | Michael Paquier <michael(at)paquier(dot)xyz> | 
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: BUG #15402: Hot standby server with archive_mode=on keeps initial WAL segments | 
| Date: | 2018-09-26 05:12:36 | 
| Message-ID: | 20180926141236.160707712aea82341f01b03f@sraoss.co.jp | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
Hello, Michael
> > > 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?
I understand this scenario.
 (1) archive_mode=always and archvie_command failure 
 (2) .ready files are building up
 (3) switch to archive_mode=on
 (4) WAL segments with .ready status are swept
 (5) switch to archive_mode=always
     some WAL segments are lost.
I think is it natural that some segments are not archived when you 
switch archive_mode back-and-forth.
I also think a fix to prevent generating .ready file at hot standby
server in this case is better. I don't have a concrete idea to do so now.
Thanks,
Haruka Takatsuka 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | PG Bug reporting form | 2018-09-26 12:19:14 | BUG #15403: segmentation fault error | 
| Previous Message | TAKATSUKA Haruka | 2018-09-26 04:36:40 | Re: BUG #15402: Hot standby server with archive_mode=on keeps initial WAL segments |