Re: odd pg_start_backup() issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 31, 2014 at 9:55 AM, CS DBA <cs_dba@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxx


-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux