diff options
author | Bruce Momjian <bruce@momjian.us> | 2010-03-03 23:38:44 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2010-03-03 23:38:44 +0000 |
commit | 0ea0afa44452b617ce1259cff27b2a24247e8b8e (patch) | |
tree | b1880699672dcc21010eb42cbfd1dbd62a490495 /src | |
parent | ea066f87c3e98166639d9f08a15d5b551f62d3ed (diff) | |
download | postgresql-0ea0afa44452b617ce1259cff27b2a24247e8b8e.tar.gz postgresql-0ea0afa44452b617ce1259cff27b2a24247e8b8e.zip |
Add C comment about DDL changes possibly causing pg_dump errors.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/pg_dump/pg_dump.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 44bdddaf88d..18dd71e364f 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 $ * *------------------------------------------------------------------------- */ |