Re: pg_start_backup('label',true) why do I need 2nd parameter?

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: pg_start_backup('label',true) why do I need 2nd parameter?
Дата
Msg-id 1383696944415-5777153.post@n5.nabble.com
обсуждение исходный текст
Ответ на pg_start_backup('label',true) why do I need 2nd parameter?  (AI Rumman <rummandba@gmail.com>)
Список pgsql-general
rummandba wrote
> A few days back, I faced a problem where I *pg_start_backup('label') *was
> hang in the server forever.

so, the server is still hung?  can you define what you mean by "hung" - what
did and did not work?


> I stopped the process and then used *pg_start_backup('label',true) *and
> it
> worked.

Ok, so not forever :)  How long then?  Any guess you give will be more
accurate than "forever".

So when you told it to "start now" it did but when you told it "start
whenever you are ready" is said "ok, I'll get back to ya." ...


> This forces an
> immediate checkpoint which will cause a spike in I/O operations, slowing
> any concurrently executing queries."

From the same documentation (section 24.3.3):


> By default, pg_start_backup can take a long time to finish. This is
> because it performs a checkpoint, and the I/O required for the checkpoint
> will be spread out over a significant period of time, by default half your
> inter-checkpoint interval (see the configuration parameter
> checkpoint_completion_target). This is usually what you want, because it
> minimizes the impact on query processing. If you want to start the backup
> as soon as possible, use: [the true parameter]

So assuming defaults you would be expected to wait about 2.5 minutes:

5 minutes default checkpoint_timeout
times .5 default checkpoint_completion_target

[note, I am confused by the wording above if there should be another .50
multiplier]

That is significantly less than forever but it may be more time that you
gave it before cancelling the process...and that assumes you are using
defaults.

Without knowing the setting for "checkpoint_timeout" (and completion target,
but you are less likely to have changed that) it is impossible to know
whether your finite wait was longer than could be expected.

David J.





--
View this message in context:
http://postgresql.1045698.n5.nabble.com/pg-start-backup-label-true-why-do-I-need-2nd-parameter-tp5777145p5777153.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: sparikh
Дата:
Сообщение: Re: Clone database using rsync?
Следующее
От: Bill Moran
Дата:
Сообщение: Re: pg_start_backup('label',true) why do I need 2nd parameter?