diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 44bdddaf88d81c4f0a70afa834ee7ca6ef153978..18dd71e364f7415697bfc83a198687a4ee019ec5 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -11,8 +11,21 @@ * script that reproduces the schema in terms of SQL that is understood * by PostgreSQL * + * Note that pg_dump runs in a serializable transaction, so it sees a + * consistent snapshot of the database including system catalogs. + * However, it relies in part on various specialized backend functions + * like pg_get_indexdef(), and those things tend to run on SnapshotNow + * time, ie they look at the currently committed state. So it is + * possible to get 'cache lookup failed' error if someone performs DDL + * changes while a dump is happening. The window for this sort of thing + * is from the beginning of the serializable transaction to + * getSchemaData() (when pg_dump acquires AccessShareLock on every + * table it intends to dump). It isn't very large, but it can happen. + * + * http://archives.postgresql.org/pgsql-bugs/2010-02/msg00187.php + * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.576 2010/03/03 20:10:48 heikki Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.577 2010/03/03 23:38:44 momjian Exp $ * *------------------------------------------------------------------------- */