Re: Archive recovery won't be completed on some situation.

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Archive recovery won't be completed on some situation.
Дата
Msg-id 20140320143839.GR6899@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Archive recovery won't be completed on some situation.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: Archive recovery won't be completed on some situation.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Re: Archive recovery won't be completed on some situation.  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
Kyotaro HORIGUCHI escribió:
> Hi, I confirmed that 82233ce7ea4 surely did it.
> 
> At Wed, 19 Mar 2014 09:35:16 -0300, Alvaro Herrera wrote
> > Fujii Masao escribió:
> > > On Wed, Mar 19, 2014 at 7:57 PM, Heikki Linnakangas
> > > <hlinnakangas@vmware.com> wrote:
> > 
> > > >> 9.4 canceles backup mode even on immediate shutdown so the
> > > >> operation causes no problem, but 9.3 and before are doesn't.
> > > >
> > > > Hmm, I don't think we've changed that behavior in 9.4.
> > > 
> > > ISTM 82233ce7ea42d6ba519aaec63008aff49da6c7af changed immdiate
> > > shutdown that way.
> > 
> > Uh, interesting.  I didn't see that secondary effect.  I hope it's not
> > for ill?
> 
> The crucial factor for the behavior change is that pmdie has
> become not to exit immediately for SIGQUIT. 'case SIGQUIT:' in
> pmdie() ended with "ExitPostmaster(0)" before the patch but now
> it ends with 'PostmasterStateMachine(); break;' so continues to
> run with pmState = PM_WAIT_BACKENDS, similar to SIGINT (fast
> shutdown).
> 
> After all, pmState changes to PM_NO_CHILDREN via PM_WAIT_DEAD_END
> by SIGCHLDs from non-significant processes, then CancelBackup().

Judging from what was being said on the thread, it seems that running
CancelBackup() after an immediate shutdown is better than not doing it,
correct?

> Focusing on the point described above, the small patch below
> rewinds the behavior back to 9.3 and before but I don't know the
> appropriateness in regard to the intention of the patch.

I see.  Obviously your patch would, in effect, revert 82233ce7ea
completely, which is not something we want.  I think if we want to go
back to the previous behavior of not stopping the backup, some other
method should be used.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Portability issues in shm_mq
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Risk Estimation WAS: Planner hints in Postgresql