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

Поиск
Список
Период
Сортировка
От Bill Moran
Тема Re: pg_start_backup('label',true) why do I need 2nd parameter?
Дата
Msg-id 20131105214407.9f7a6c0f6fd1c48f21ed4418@potentialtech.com
обсуждение исходный текст
Ответ на pg_start_backup('label',true) why do I need 2nd parameter?  (AI Rumman <rummandba@gmail.com>)
Ответы Re: pg_start_backup('label',true) why do I need 2nd parameter?
Список pgsql-general
On Tue, 5 Nov 2013 15:30:19 -0800 AI Rumman <rummandba@gmail.com> wrote:

> Hi all,
>
> A few days back, I faced a problem where I *pg_start_backup('label') *was
> hang in the server forever.
> I stopped the process and then used *pg_start_backup('label',true) *and  it
> worked.
>
> Now I am trying to investigate why I need to use true as second parameter
> and read the doc
> "There is an optional second parameter of type boolean. If true, it
> specifies executing pg_start_backup as quickly as possible. This forces an
> immediate checkpoint which will cause a spike in I/O operations, slowing
> any concurrently executing queries."

To add to what David said in his email ... essentially with the second
parameter at false (which is the same as omitting it) you are telling
the system to not interfere with other concurrently running processes
and take as much time as necessary to prep the system without interfering.
How long that takes is a factor of other settings (as David mentioned) and
also depedent on what other transactions may be running.

With the second parameter at true, you're telling Postgres to execute the
start backup as fast as possible and if other queries are temporarily
slow or unresponsive while it's getting there, that's OK.

As far as exactly replicating the scenerio, you would need to know what
else was running on the server at the time to exactly replicate it.

>
> I tried to regenerate the scenario where  *pg_start_backup('label')
> *hanged and
> I failed.
> Any idea, how can I regenerate that issue to investigate.
>
> I am using Postgresql 9.2.
>
> Thanks.


--
Bill Moran <wmoran@potentialtech.com>


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

Предыдущее
От: David Johnston
Дата:
Сообщение: 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?