Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-10-02 Thread Masahiko Sawada
On Wed, Oct 2, 2019 at 3:58 PM Michael Paquier wrote: > > On Mon, Sep 30, 2019 at 05:07:08PM +0900, Masahiko Sawada wrote: > > Thank you for updating! The comment in your patch is much better. > > Thanks, done and back-patched down to 9.5. Thank you! Regards, -- Masahiko Sawada

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-10-02 Thread Michael Paquier
On Mon, Sep 30, 2019 at 05:07:08PM +0900, Masahiko Sawada wrote: > Thank you for updating! The comment in your patch is much better. Thanks, done and back-patched down to 9.5. -- Michael signature.asc Description: PGP signature

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-30 Thread Masahiko Sawada
On Mon, Sep 30, 2019 at 5:03 PM Michael Paquier wrote: > > On Mon, Sep 30, 2019 at 12:53:58PM +0900, Masahiko Sawada wrote: > > I think that the above checks are always true because isnt() function > > checks if the 1st argument and 2nd argument are not the same. > > Dammit. I overlooked this

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-30 Thread Michael Paquier
On Mon, Sep 30, 2019 at 12:53:58PM +0900, Masahiko Sawada wrote: > I think that the above checks are always true because isnt() function > checks if the 1st argument and 2nd argument are not the same. Dammit. I overlooked this part of the module's doc. > I've attached the updated version patch

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-29 Thread Masahiko Sawada
On Mon, Sep 30, 2019 at 10:10 AM Michael Paquier wrote: > > On Fri, Sep 27, 2019 at 10:00:16PM +0900, Masahiko Sawada wrote: > > I abandoned once to move the removal code to between > > writeTimeLineHistory() and timeline switching because of expanding the > > window but since unlink itself will

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-29 Thread Michael Paquier
On Fri, Sep 27, 2019 at 10:00:16PM +0900, Masahiko Sawada wrote: > I abandoned once to move the removal code to between > writeTimeLineHistory() and timeline switching because of expanding the > window but since unlink itself will complete within a very short time > it would not be problamatic

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-27 Thread Masahiko Sawada
On Fri, Sep 27, 2019 at 8:41 PM Fujii Masao wrote: > > On Fri, Sep 27, 2019 at 7:16 PM Michael Paquier wrote: > > > > On Fri, Sep 27, 2019 at 05:58:21PM +0900, Fujii Masao wrote: > > > So you think that it's better to remove them just after > > > writeTimeLineHistory()? > > > Per the following

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-27 Thread Fujii Masao
On Fri, Sep 27, 2019 at 7:16 PM Michael Paquier wrote: > > On Fri, Sep 27, 2019 at 05:58:21PM +0900, Fujii Masao wrote: > > So you think that it's better to remove them just after > > writeTimeLineHistory()? > > Per the following Sawada-san's comment, I was thinking that idea is > > basically >

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-27 Thread Michael Paquier
On Fri, Sep 27, 2019 at 05:58:21PM +0900, Fujii Masao wrote: > So you think that it's better to remove them just after > writeTimeLineHistory()? > Per the following Sawada-san's comment, I was thinking that idea is basically > not good. And, RemoveNonParentXlogFiles() also removes garbage files

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-27 Thread Fujii Masao
On Fri, Sep 27, 2019 at 5:09 PM Michael Paquier wrote: > > On Fri, Sep 27, 2019 at 01:51:25PM +0900, Masahiko Sawada wrote: > > On Thu, Sep 26, 2019 at 6:23 PM Fujii Masao wrote: > >> What about moving the logic that removes RECO VERYXLOG and > >> RECOVERYHISTORY from exitArchiveRecovery() and

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-27 Thread Michael Paquier
On Fri, Sep 27, 2019 at 01:51:25PM +0900, Masahiko Sawada wrote: > On Thu, Sep 26, 2019 at 6:23 PM Fujii Masao wrote: >> What about moving the logic that removes RECO VERYXLOG and >> RECOVERYHISTORY from exitArchiveRecovery() and performing it >> just before/after RemoveNonParentXlogFiles()?

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-26 Thread Masahiko Sawada
On Thu, Sep 26, 2019 at 6:23 PM Fujii Masao wrote: > > On Thu, Sep 26, 2019 at 5:15 PM Masahiko Sawada wrote: > > > > Hi, > > > > When we do archive recovery from the database cluster of which > > timeline ID is more than 2 pg_wal/RECOVERYHISTORY is remained even > > after archive recovery

Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-26 Thread Fujii Masao
On Thu, Sep 26, 2019 at 5:15 PM Masahiko Sawada wrote: > > Hi, > > When we do archive recovery from the database cluster of which > timeline ID is more than 2 pg_wal/RECOVERYHISTORY is remained even > after archive recovery completed. > > The cause of this seems cbc55da556b that moved

pg_wal/RECOVERYHISTORY file remains after archive recovery

2019-09-26 Thread Masahiko Sawada
Hi, When we do archive recovery from the database cluster of which timeline ID is more than 2 pg_wal/RECOVERYHISTORY is remained even after archive recovery completed. The cause of this seems cbc55da556b that moved exitArchiveRecovery() to before writeTimeLineHistory(). writeTimeLineHIstory()