Re: Improve shutdown during online backup

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Improve shutdown during online backup
Дата
Msg-id 1207068141.4238.51.camel@ebony.site
обсуждение исходный текст
Ответ на Improve shutdown during online backup  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Ответы Re: Improve shutdown during online backup  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-patches
On Tue, 2008-04-01 at 15:34 +0200, Albe Laurenz wrote:
> This follows up on the discussion in
> http://archives.postgresql.org/pgsql-hackers/2008-03/msg01033.php
>
> - pg_ctl will refuse a smart shutdown during online backup.
> - The postmaster will also refuse to shutdown in smart mode
>   in that case and log a message to that effect.
> - In fast shutdown mode, the server will rename "backup_label"
>   after successfully shutting down and log the fact.

Looks good.


Few comments:

* smart shutdown waits for sessions to complete, yet this just ignores
smart shutdowns which is something a little different. I think we
should wait for the backup to complete and then shutdown.

* when we say "online backup cancelled" I think we should say something
more like "online backup mode cancelled". All we are doing is removing
the backup label file, we're not actually cancelling the physical backup
since it is external to the database anyway.

* The #defines at top of postmaster.c are duplicated from xlog.c
If we can't agree on a common header file then we should at least add a
comment to mention they are duplicated (in both locations).

--
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com

  PostgreSQL UK 2008 Conference: http://www.postgresql.org.uk


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] Minor changes to Recovery related code
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Improve shutdown during online backup