X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id DFF999DC984 for ; Mon, 9 Jan 2006 16:22:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26349-10 for ; Mon, 9 Jan 2006 16:22:11 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by postgresql.org (Postfix) with ESMTP id 38DAC9DC940 for ; Mon, 9 Jan 2006 16:22:08 -0400 (AST) Received: by wproxy.gmail.com with SMTP id i28so2715089wra for ; Mon, 09 Jan 2006 12:22:09 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hLv6yabE+hzH2oLowmYsDjfIakoeedwhnudPBnfmW09tplVdDP27wteiF49MrQsPmfISbLozfcFIBbylX1M/dJH8wYn3CL6l5+4s93corXb/OLfXDunsnKlyj6hZdueGoG+Fc8IAt/FvNud4NjAAWgEFaCRsyw683/KrZOXYhZg= Received: by 10.54.67.10 with SMTP id p10mr4301296wra; Mon, 09 Jan 2006 12:22:09 -0800 (PST) Received: by 10.54.92.14 with HTTP; Mon, 9 Jan 2006 12:22:09 -0800 (PST) Message-ID: Date: Mon, 9 Jan 2006 15:22:09 -0500 From: Jaime Casanova To: Chris Hoover Subject: Re: What happens to transactions durring a pg_dump? Cc: Michael Fuhr , "pgsql-admin@postgresql.org" In-Reply-To: <1d219a6f0601091000u45439e1dq1eb8296e8ffa3dba@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <1d219a6f0601090922s5224e78emd68cf850b836c2af@mail.gmail.com> <20060109174511.GA43775@winnie.fuhr.org> <1d219a6f0601091000u45439e1dq1eb8296e8ffa3dba@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.082 required=5 tests=[AWL=0.082] X-Spam-Score: 0.082 X-Spam-Level: X-Archive-Number: 200601/97 X-Sequence-Number: 20185 On 1/9/06, Chris Hoover wrote: > > > On 1/9/06, Michael Fuhr wrote: > > On Mon, Jan 09, 2006 at 12:22:27PM -0500, Chris Hoover wrote: > > > I'm trying to understand better what happens to a transaction that is > > > commited in the middle of a pg_dump. Is the transaction included in = the > > > database dump, or is it excluded. > > > > If you look at the pg_dump source code or turn on query logging, > > you should see that pg_dump starts with > > > > BEGIN > > SET TRANSACTION ISOLATION LEVEL SERIALIZABLE > > > > See "Transaction Isolation" in the "Concurrency Control" chapter of the > > documentation for an explanation of what that means. > > > > > http://www.postgresql.org/docs/8.1/interactive/transaction-iso.html > > > > -- > > Michael Fuhr > > > > Just to make sure I correctly understood what I read, once pg_dump issues > the : > BEGIN > SET TRANSACTION ISOLATION LEVEL SERIALIZABLE > > The backup will only see transactions that were commited before the > isolation level was set Is this correct? Any transactions that are commi= ted > while the backup is running are not seen by pg_dump. > > Correct? > > Thanks, > > Chris > correct -- regards, Jaime Casanova (DBA: DataBase Aniquilator ;)