pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Boreham <david_list@boreham.org>
To: Piccarello, James (James) <jpicc@avaya.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Postgres recovery time
Date: Mon, 14 Nov 2005 14:41:29 -0700
Message-ID: <43790489.4030803@boreham.org> (raw)
In-Reply-To: <16F9BDD39536704DA7BFB3172BF191720355ED84@nj7460avexu2.global.avaya.com>
References: <16F9BDD39536704DA7BFB3172BF191720355ED84@nj7460avexu2.global.avaya.com>

Piccarello, James (James) wrote:

> Does anyone know what factors affect the recovery time of postgres if 
> it does not shutdown cleanly? With the same size database I've seen  
> times from a few seconds to a few minutes. The longest time was 33 
> minutes. The 33 minutes was after a complete system crash and reboot 
> so there are a lot of other things going on as well. 125 seconds was 
> the longest time I could reproduce by just doing a kill -9 on postmaster.
>
> Is it the size of the transaction log? The dead space in files?
>
I don't know much about postgresql, but typically WAL mechanisms
will exhibit recovery times that are bounded by the amount of log record
data written since the last checkpoint. The 'worst' case will be where
you have continuous writes to the database and a long checkpoint
interval. In that case many log records must be replayed into the
data files upon recovery. The 'best' case would be zero write transactions
since the last checkpoint. In that case recovery would be swift since
there are no live records to recover. In your tests you are probably
exercising this 'best' or near best case.

view thread (2+ messages)

Message-ID: <43790489.4030803@boreham.org>
Permalink:  ../43790489.4030803@boreham.org/
Also on:    postgresql.org/message-id/43790489.4030803@boreham.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: david_list@boreham.org, jpicc@avaya.com
  Subject: Re: Postgres recovery time
  In-Reply-To: <43790489.4030803@boreham.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox