| From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
|---|---|
| To: | CS DBA <cs_dba(at)consistentstate(dot)com> |
| Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: odd pg_start_backup() issue |
| Date: | 2014-02-01 00:43:14 |
| Message-ID: | CAL_0b1sgbiJdo4SPiEtu-2XmAX2Z9CXzwLryry86PgTioU-W9w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
On Fri, Jan 31, 2014 at 9:55 AM, CS DBA <cs_dba(at)consistentstate(dot)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(dot)ru(at)gmail(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | CS DBA | 2014-02-02 15:52:15 | Cannot change archive_command with a reload |
| Previous Message | Ray Stell | 2014-01-31 22:48:42 | Re: configuring openssl for postgres 9.2 for the first time |