X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0665B11F610C for ; Sun, 23 Apr 2006 14:05:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 63025-01 for ; Sun, 23 Apr 2006 14:05:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by postgresql.org (Postfix) with ESMTP id E7C0611F60BE for ; Sun, 23 Apr 2006 14:05:21 -0300 (ADT) Received: from [195.112.43.22] (helo=[192.168.0.7]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis), id 0ML25U-1FXi1J1658-0008Eo; Sun, 23 Apr 2006 19:05:13 +0200 Subject: Re: Recovery will take 10 hours From: Simon Riggs To: Brendan Duddridge Cc: PostgreSQL Performance In-Reply-To: <85A15B2E-F59C-4FEF-82D4-61F48ABDCDE5@clickspace.com> References: <85A15B2E-F59C-4FEF-82D4-61F48ABDCDE5@clickspace.com> Content-Type: text/plain Date: Sun, 23 Apr 2006 17:06:07 +0100 Message-Id: <1145808368.3112.222.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-4.fc4) Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de login:726643fe08f41a451f0fe7fa43bce239 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/514 X-Sequence-Number: 18598 On Thu, 2006-04-20 at 13:29 -0600, Brendan Duddridge wrote: > We had a database issue today that caused us to have to restore to > our most recent backup. We are using PITR so we have 3120 WAL files > that need to be applied to the database. How often are you taking base backups? > After 45 minutes, it has restored only 230 WAL files. At this rate, > it's going to take about 10 hours to restore our database. > Most of the time, the server is not using very much CPU time or I/O > time. So I'm wondering what can be done to speed up the process? You can improve the performance of a recovery by making your restore command overlap retrieval of files. The recovery process waits while the restore command returns a file, so by doing an asynchronous lookahead of one file you can be gunzipping the next file while the current one is being processed. I'll either document this better, or build an overlap into the restore command processing itself, so the script doesn't need to do this. -- Simon Riggs EnterpriseDB http://www.enterprisedb.com/