Re: [HACKERS] reaper should restart archiver even on standby

2015-06-12 Thread Fujii Masao
On Thu, Jun 11, 2015 at 1:39 AM, Alvaro Herrera wrote: > Fujii Masao wrote: > >> Agreed. The attached patch defines the macro to check whether archiver is >> allowed to start up or not, and uses it everywhere except sigusr1_handler. >> I made sigusr1_handler use a different condition because only

Re: [HACKERS] reaper should restart archiver even on standby

2015-06-10 Thread Alvaro Herrera
Fujii Masao wrote: > Agreed. The attached patch defines the macro to check whether archiver is > allowed to start up or not, and uses it everywhere except sigusr1_handler. > I made sigusr1_handler use a different condition because only it tries to > start archiver in PM_STARTUP postmaster state an

Re: [HACKERS] reaper should restart archiver even on standby

2015-06-10 Thread Fujii Masao
On Wed, Jun 10, 2015 at 11:12 PM, Alvaro Herrera wrote: > Fujii Masao wrote: >> On Tue, Jun 9, 2015 at 5:21 AM, Alvaro Herrera >> wrote: >> > Fujii Masao wrote: > >> > Can't we create >> > some common function that would be called both here and on ServerLoop? >> >> Agreed. So, what about the att

Re: [HACKERS] reaper should restart archiver even on standby

2015-06-10 Thread Alvaro Herrera
Fujii Masao wrote: > On Tue, Jun 9, 2015 at 5:21 AM, Alvaro Herrera > wrote: > > Fujii Masao wrote: > > Can't we create > > some common function that would be called both here and on ServerLoop? > > Agreed. So, what about the attached patch? No attachment ... > > We also have sigusr1_handler

Re: [HACKERS] reaper should restart archiver even on standby

2015-06-09 Thread Fujii Masao
On Tue, Jun 9, 2015 at 5:21 AM, Alvaro Herrera wrote: > Fujii Masao wrote: >> Hi, >> >> When the archiver exits, currently reaper() restarts it only while >> the postmaster state is PM_RUN. This is OK in 9.4 or before because >> the archiver could be running on that state. But in 9.5, we can set >

Re: [HACKERS] reaper should restart archiver even on standby

2015-06-08 Thread Alvaro Herrera
Fujii Masao wrote: > Hi, > > When the archiver exits, currently reaper() restarts it only while > the postmaster state is PM_RUN. This is OK in 9.4 or before because > the archiver could be running on that state. But in 9.5, we can set > archive_mode to "always" and start the archiver even on the

[HACKERS] reaper should restart archiver even on standby

2015-06-08 Thread Fujii Masao
Hi, When the archiver exits, currently reaper() restarts it only while the postmaster state is PM_RUN. This is OK in 9.4 or before because the archiver could be running on that state. But in 9.5, we can set archive_mode to "always" and start the archiver even on the standby. So I think that reaper