Search Postgresql Archives

Re: Replication/cloning: rsync vs modification dates?

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

 



On Fri, Jul 27, 2012 at 02:13:31PM +1000, Chris Angelico wrote:
> On Fri, Jul 27, 2012 at 9:57 AM, Chris Angelico <rosuav@xxxxxxxxx> wrote:
> > On Fri, Jul 27, 2012 at 9:53 AM, Bruce Momjian <bruce@xxxxxxxxxx> wrote:
> >> You might want to look at the hackers list thread I started about the
> >> same topic a week before your post:
> >>
> >>         http://archives.postgresql.org/pgsql-hackers/2012-07/msg00416.php
> >>
> >> Basically, you can only use mtime/size if you are replaying WAL.
> >
> > I'll check that out in a bit; but hot standby includes replaying WAL,
> > right? That's what we're doing - full live replication with
> > possibility to "pg_ctl promote" a slave straight up to master.
> 
> Hi, thanks for that link. Just got a chance to read through the thread.
> 
> In this post[1] the script executes "checkpoint" before
> "pg_start_backup" - is that important? According to the docs[2]:
> 
> "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."

A checkpoint is always issued by pg_start_backup().  The boolean
controls whether the checkpoint is immediate or smoothed, meaning it can
take a while to return a status of complete.

> Is "checkpoint; select pg_start_backup('foo');" the same as "select
> pg_start_backup('foo',true);"? And what are the consequences of not
> calling for a checkpoint that way? My understanding of the docs is
> that the pg_start_backup call will hang until a checkpoint happens
> organically, ie delaying the backup rather than other clients, but I'm
> not really sure and haven't a sample database big or busy enough to
> test this on.

Right, checkpoint is started by pg_start_backup() but is smoothed by
default.

-- 
  Bruce Momjian  <bruce@xxxxxxxxxx>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux