Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D4B322E00BD for ; Sun, 25 Nov 2007 15:35:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 47725-07 for ; Sun, 25 Nov 2007 15:35:26 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 202A92E0207 for ; Sun, 25 Nov 2007 15:35:29 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lAPJZRFX020569; Sun, 25 Nov 2007 14:35:27 -0500 (EST) To: "Peter Childs" cc: pgsql-performance@postgresql.org Subject: Re: doubt with pg_dump and high concurrent used databases In-reply-to: References: <4749A6ED.2010005@laotraesquina.com.ar> <9D744F5C-08B2-4C85-B06A-1A9FAD533AB6@myemma.com> Comments: In-reply-to "Peter Childs" message dated "Sun, 25 Nov 2007 19:15:17 +0000" Date: Sun, 25 Nov 2007 14:35:27 -0500 Message-ID: <20568.1196019327@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/295 X-Sequence-Number: 27710 "Peter Childs" writes: > On 25/11/2007, Erik Jones wrote: >>> Does the pg_dump create this kind of "consistent backups"? Or do I >>> need to do the backups using another program? >> >> Yes, that is exactly what pg_dump does. >> > Yes so long as you are using transactions correctly. Ie doing a begin before > each invoice and a commit afterwards if your not bothering and using auto > commit you *may* have problems. I think you need to qualify that a bit more. What you're saying is that if an application has consistency requirements that are momentarily violated during multi-statement updates, and it fails to wrap such updates into a single transaction, then pg_dump could capture one of the intermediate states. That's true, but it's hardly pg_dump's fault. If there were a system crash partway through such a sequence, the consistency requirements would be violated afterwards, too. regards, tom lane