pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Victor Yegorov <viy@pirmabanka.lv>
Cc: pgsql-admin@postgresql.org
Subject: Re: DB archiving
Date: Mon, 17 Mar 2003 10:53:23 -0500
Message-ID: <6522.1047916403@sss.pgh.pa.us> (raw)
In-Reply-To: <20030317152737.GA12646@pirmabanka.lv>
References: <20030317103331.GM7181@pirmabanka.lv>
	<1047912320.23066.1281.camel@camel>
	<20030317152737.GA12646@pirmabanka.lv>

Victor Yegorov <viy@pirmabanka.lv> writes:
> One more thing. I still cannot find any info on HOW pg_dump locks data it
> is going to backup.

It doesn't.  Well, it does take a reader's lock (AccessShareLock) on
each table it intends to back up, but that's essentially just preventing
the table from being dropped completely.  The individual data rows need
not be locked.  pg_dump does the whole dump as a single transaction, so
it can rely on MVCC semantics to give it a consistent picture of the
data in every table.  Basically, it doesn't "see" changes that commit
after its transaction starts.  See the discussion of MVCC.

			regards, tom lane



view thread (4+ messages)

Message-ID: <6522.1047916403@sss.pgh.pa.us>
Permalink:  ../6522.1047916403@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6522.1047916403@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, viy@pirmabanka.lv
  Subject: Re: DB archiving
  In-Reply-To: <6522.1047916403@sss.pgh.pa.us>
  References: <20030317103331.GM7181@pirmabanka.lv> <1047912320.23066.1281.camel@camel> <20030317152737.GA12646@pirmabanka.lv> <6522.1047916403@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox