X-Original-To: pgsql-admin@postgresql.org Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 47FAD476241 for ; Mon, 17 Mar 2003 10:53:22 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h2HFrNub006523; Mon, 17 Mar 2003 10:53:23 -0500 (EST) To: Victor Yegorov Cc: pgsql-admin@postgresql.org Subject: Re: DB archiving In-reply-to: <20030317152737.GA12646@pirmabanka.lv> References: <20030317103331.GM7181@pirmabanka.lv> <1047912320.23066.1281.camel@camel> <20030317152737.GA12646@pirmabanka.lv> Comments: In-reply-to Victor Yegorov message dated "Mon, 17 Mar 2003 17:27:37 +0200" Date: Mon, 17 Mar 2003 10:53:23 -0500 Message-ID: <6522.1047916403@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200303/268 X-Sequence-Number: 7908 Victor Yegorov 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