Re: pg_start_backup() takes too long

From: "Ivan Zolotukhin" <ivan(dot)zolotukhin(at)gmail(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, "Bruce Momjian" <bruce(at)momjian(dot)us>, "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_start_backup() takes too long
Date: 2008-09-30 08:58:58
Message-ID: 751e56400809300158j6703ba40q849af8bd61440015@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 29, 2008 at 2:12 PM, Simon Riggs <simon(at)2ndquadrant(dot)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?).

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message john.crawford 2008-09-30 09:10:34 Re: database question
Previous Message Abdul Rahman 2008-09-30 08:51:36 Re: Replication using slony-I