Re: DB archiving

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Victor Yegorov <viy(at)pirmabanka(dot)lv>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: DB archiving
Date: 2003-03-17 15:53:23
Message-ID: 6522.1047916403@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Victor Yegorov <viy(at)pirmabanka(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Matt Clark 2003-03-17 15:56:13 Re: recomended plataform
Previous Message Sidar Lopez Cruz 2003-03-17 15:50:54 recomended plataform