question about pg_dump

Started by Scot Kreienkampover 16 years ago3 messagesgeneral
Jump to latest
#1Scot Kreienkamp
SKreien@la-z-boy.com

Hi everyone,

I have a question about pg_dump backups. Will changes made in the
database made during a pg_dump operation be reflected in the dumped
datafile? Or is the data the exact dataset that was in the database as
of the start of the backup?

From what I understand of the documentation, any changes made during the
backup would NOT be in the dumped datafile. That is very important for
a monthend process where I need consistent data as of exactly the time
the dump starts, which is why I'm confirming that is indeed the case.

Thanks,

Scot Kreienkamp

skreien@la-z-boy.com

#2Grzegorz Jaśkiewicz
gryzman@gmail.com
In reply to: Scot Kreienkamp (#1)
Re: question about pg_dump

On Thu, Oct 22, 2009 at 3:42 PM, Scot Kreienkamp <SKreien@la-z-boy.com>wrote:

Hi everyone,

I have a question about pg_dump backups. Will changes made in the database
made during a pg_dump operation be reflected in the dumped datafile? Or is
the data the exact dataset that was in the database as of the start of the
backup?

pg_dump opens transaction, on a serializable isolation level. In short, it

is the proper full isolation level (as oppose to the default one: "read
committed"). It can cause locks up on database, but the idea is that the
dump it self is a snapshot, and is fully atomic.

--
GJ

#3Scott Marlowe
scott.marlowe@gmail.com
In reply to: Grzegorz Jaśkiewicz (#2)
Re: question about pg_dump

2009/10/22 Grzegorz Jaśkiewicz <gryzman@gmail.com>:

On Thu, Oct 22, 2009 at 3:42 PM, Scot Kreienkamp <SKreien@la-z-boy.com>
wrote:

Hi everyone,

I have a question about pg_dump backups.  Will changes made in the
database made during a pg_dump operation be reflected in the dumped
datafile?  Or is the data the exact dataset that was in the database as of
the start of the backup?

pg_dump opens transaction, on a serializable isolation level. In short, it
is the proper full isolation level (as oppose to the default one: "read
committed"). It can cause locks up on database, but the idea is that the
dump it self is a snapshot, and is fully atomic.

Only DDL type stuff should be locked. Regular updates / inserts /
delete should run just fine during a backup.