Doing pg_dump while still many active transaction
Asked Answered
L

2

10

As subjects, what will happen to the backup file while there is still many active transaction in the database. Does it export realtime or just partially backups ?

thanks in advance.

Lusty answered 22/10, 2010 at 9:45 Comment(0)
S
11

pg_dump runs in a serializable transaction, so it sees a consistent snapshot of the database including system catalogs.

However it is possible to get 'cache lookup failed' error if someone performs DDL changes while a dump is starting. The time window for this sort of thing isn't very large, but it can happen. See: http://archives.postgresql.org/pgsql-bugs/2010-02/msg00187.php

Sisto answered 22/10, 2010 at 10:14 Comment(0)
S
2

pg_dump will give you a consistent state. Any transaction not completed before pg_dump has been issued will not be reflected.

Sundstrom answered 22/10, 2010 at 9:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.