Re: DB archiving - Mailing list pgsql-admin

From Tom Lane
Subject Re: DB archiving
Date
Msg-id 6522.1047916403@sss.pgh.pa.us
Whole thread Raw
In response to Re: DB archiving  (Victor Yegorov <viy@pirmabanka.lv>)
List pgsql-admin
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

pgsql-admin by date:

Previous
From: Andreas Schmitz
Date:
Subject: select database_size (another one)
Next
From: "Matt Clark"
Date:
Subject: Re: recomended plataform