Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 01DAB2E0061 for ; Mon, 5 May 2008 14:42:25 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76986-06 for ; Mon, 5 May 2008 14:42:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from outmail136040.authsmtp.co.uk (outmail136040.authsmtp.co.uk [62.13.136.40]) by developer.postgresql.org (Postfix) with ESMTP id 8E3D42E005C for ; Mon, 5 May 2008 14:42:21 -0300 (ADT) Received: from mail.authsmtp.com (mail.authsmtp.com [62.13.128.187]) by punt3.authsmtp.com (8.13.8/8.13.8/Kp) with ESMTP id m45HgHuI058377; Mon, 5 May 2008 18:42:17 +0100 (BST) Received: from [192.168.0.3] (85-211-73-85.dyn.gotadsl.co.uk [85.211.73.85]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m45HgFHO015065; Mon, 5 May 2008 18:42:16 +0100 (BST) Subject: Re: Backup causing poor performance - suggestions From: Simon Riggs To: Craig James Cc: "Campbell, Lance" , pgsql-performance@postgresql.org In-Reply-To: <481F3168.8050600@emolecules.com> References: <481F3168.8050600@emolecules.com> Content-Type: text/plain Date: Mon, 05 May 2008 18:43:52 +0100 Message-Id: <1210009432.4435.102.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 Content-Transfer-Encoding: 7bit X-Server-Quench: 9a20303c-1aca-11dd-941c-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksachtFaABbYFhI HGQLW1xEUVV7XWF/ agwfZQBDYEtPQQJp TkBMXVBXCwUmXBgE fkloKmZydgBGfns+ Z0djXD5SDUZ6dkZ+ EVNVRD5XeGZhPDQC WURZJB5UcAJLdhoR aVd4ByJDAzANdhEA MjUdGAoUCH11IS9W XxlFJlsPWkcNEXYk QBcYVS0iB0MCXSA6 KRcrYhtUB1sePUgp LVomX0lw X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:953/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/57 X-Sequence-Number: 30025 On Mon, 2008-05-05 at 09:10 -0700, Craig James wrote: > Campbell, Lance wrote: > > We currently backup all of our database tables per schema using pg_dump > > every half hour. We have been noticing that the database performance > > has been very poor during the backup process. How can I improve the > > performance? > > It sounds like the goal is to have frequent, near-real-time backups of > your databases for recovery purposes. Maybe instead of looking at > pg_dump's performance, a better solution would be a replication system > such as Slony, or a "warm backup" using Skype Tools. > > Backing up the database every half hour puts a large load on the > system during the dump, and means you are re-dumping the same data, 48 > times per day. If you use a replication solution, the backup process > is continuous (spread out through the day), and you're not re-dumping > static data; the only data that moves around is the new data. > > I've used Slony with mixed success; depending on the complexity and > size of your database, it can be quite effective. I've heard very > good reports about Skype Tools, which has both a Slony-like replicator > (not as configurable as Slony, but easier to set up and use), plus an > entirely separate set of scripts that simplifies "warm standby" using > WAL logging. I think we should mention Warm Standby via pg_standby, which is part of core software and documentation. Seems strange not to mention it at all. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com