Skip to content

Commit 0ea0afa

Browse files
committed
Add C comment about DDL changes possibly causing pg_dump errors.
1 parent ea066f8 commit 0ea0afa

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,21 @@
1111
* script that reproduces the schema in terms of SQL that is understood
1212
* by PostgreSQL
1313
*
14+
* Note that pg_dump runs in a serializable transaction, so it sees a
15+
* consistent snapshot of the database including system catalogs.
16+
* However, it relies in part on various specialized backend functions
17+
* like pg_get_indexdef(), and those things tend to run on SnapshotNow
18+
* time, ie they look at the currently committed state. So it is
19+
* possible to get 'cache lookup failed' error if someone performs DDL
20+
* changes while a dump is happening. The window for this sort of thing
21+
* is from the beginning of the serializable transaction to
22+
* getSchemaData() (when pg_dump acquires AccessShareLock on every
23+
* table it intends to dump). It isn't very large, but it can happen.
24+
*
25+
* http://archives.postgresql.org/pgsql-bugs/2010-02/msg00187.php
26+
*
1427
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.576 2010/03/03 20:10:48 heikki Exp $
28+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.577 2010/03/03 23:38:44 momjian Exp $
1629
*
1730
*-------------------------------------------------------------------------
1831
*/

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy