Re: pg_start_backup() takes too long - Mailing list pgsql-general

From Ivan Zolotukhin
Subject Re: pg_start_backup() takes too long
Date
Msg-id 751e56400809300158j6703ba40q849af8bd61440015@mail.gmail.com
Whole thread Raw
In response to Re: pg_start_backup() takes too long  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: pg_start_backup() takes too long  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-general
On Mon, Sep 29, 2008 at 2:12 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>
> On Mon, 2008-09-29 at 13:39 +0400, Ivan Zolotukhin wrote:
>
>> This is all not about checkpoints. As I've mentioned in the first
>> message, even right after manual run of CHECKPOINT command in psql
>> pg_start_backup() takes same time (~10 minutes).
>
> As explained, there's not very much going on apart from the checkpoint
> and that can be problematic.
>
> What version are you running?
> What are your checkpoint_timeout and checkpoint_completion_target
> settings?
>
> My guesses are 8.3, 20 minutes, and default.

You're dead right: 8.3.3, 30 minutes (it's intended), and default.

> pg_start_backup() doesn't do an immediate checkpoint, it does a smooth
> one, so doing a CHECKPOINT beforehand should make no difference in 8.3.

Aham, now I see.

Just a few points on pg_start_backup() from user point of view. I
personally would prefer to have some control over the process, e.g. it
would be nice to have proposed pg_start_backup(label text,
immediate_chkpt boolean). But if that's not what you want by some
other reason, it would be nice to add at least log notice telling that
system is going to make a spreaded checkpoint and it's gonna take this
approximate time (one can estimate a time limit from config constants,
right?).

pgsql-general by date:

Previous
From: Abdul Rahman
Date:
Subject: Re: Replication using slony-I
Next
From: Glyn Astill
Date:
Subject: Re: Replication using slony-I