Re: What happens to transactions durring a pg_dump?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Jaime Casanova <systemguards(at)gmail(dot)com>
Cc: Chris Hoover <revoohc(at)gmail(dot)com>, Michael Fuhr <mike(at)fuhr(dot)org>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: What happens to transactions durring a pg_dump?
Date: 2006-01-22 00:25:19
Message-ID: 20060122002519.GA20969@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Jan 09, 2006 at 15:22:09 -0500,
Jaime Casanova <systemguards(at)gmail(dot)com> wrote:
> On 1/9/06, Chris Hoover <revoohc(at)gmail(dot)com> wrote:
> >
> > 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 commited
> > while the backup is running are not seen by pg_dump.
> >
> > Correct?
> >
> > Thanks,
> >
> > Chris
> >
>
> correct

I don't think that is precisely correct. I believe that the snapshot isn't
set until the first query is made within the transaction. In practice
this won't be too much of a difference for pg_dump. But if you were entering
the commands interactively and there was a long delay between the SET
command and the first query, the difference might be significant.

I found a comment on this at:
http://64.233.167.104/search?q=cache:1QgAKZwFxK8J:www.sai.msu.su/~megera/postgres/gist/papers/concurrency/concurrency.pdf+postgres+snapshot+set+serializable&hl=en

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2006-01-22 00:50:42 Re: What happens to transactions durring a pg_dump?
Previous Message Bruce Momjian 2006-01-22 00:23:33 Re: PostgreSQL Lite Version