Re: odd pg_start_backup() issue

Поиск
Список
Период
Сортировка
От Sergey Konoplev
Тема Re: odd pg_start_backup() issue
Дата
Msg-id CAL_0b1sgbiJdo4SPiEtu-2XmAX2Z9CXzwLryry86PgTioU-W9w@mail.gmail.com
обсуждение исходный текст
Ответ на odd pg_start_backup() issue  (CS DBA <cs_dba@consistentstate.com>)
Список pgsql-admin
On Fri, Jan 31, 2014 at 9:55 AM, CS DBA <cs_dba@consistentstate.com> wrote:
[...]
> Next I'll try this (I assume the first checkpoint is simply un-needed):
> echo "select pg_start_backup('$tag'); checkpoint;" | psql
> However, this  works well and the pg_start_backup finishes in less than
> 1minute,

I wonder how it helped at all, because it should not. Probably it was
some kind of a coincidence.

[...]
> Thoughts?

The note below is from the docs for pg_start_backup().

"pg_start_backup(label text [, fast boolean ])
...
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."

So all you need is to specify 'true' as a second parameter.

select pg_start_backup('$tag', true)

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com


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

Предыдущее
От: Ray Stell
Дата:
Сообщение: Re: configuring openssl for postgres 9.2 for the first time
Следующее
От: CS DBA
Дата:
Сообщение: Cannot change archive_command with a reload