diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-01-11 23:21:55 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-01-11 23:21:55 +0000 |
commit | 0e1a5075fdaec2f42f96cf2a1938c99fcc6b026c (patch) | |
tree | 512b09428119c689e738f47a041f0dce1293c8ac /src/bin/pg_dump/common.c | |
parent | 5c2d36c3ddf77de9151e579c358a066c9443762b (diff) | |
download | postgresql-0e1a5075fdaec2f42f96cf2a1938c99fcc6b026c.tar.gz postgresql-0e1a5075fdaec2f42f96cf2a1938c99fcc6b026c.zip |
Fix pg_dump to read-lock all tables to be dumped as soon as it's read
their names from pg_class. This considerably reduces the window wherein
someone could DROP or ALTER a table that pg_dump is intending to dump.
Not a perfect solution, but definitely an improvement. Per complaints
from Marc Fournier; patch by Brent Verner with some kibitzing by Tom Lane.
Diffstat (limited to 'src/bin/pg_dump/common.c')
-rw-r--r-- | src/bin/pg_dump/common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c index d9d358892cb..1a32e22b22b 100644 --- a/src/bin/pg_dump/common.c +++ b/src/bin/pg_dump/common.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.60 2001/10/25 05:49:52 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.61 2002/01/11 23:21:55 tgl Exp $ * * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2 * @@ -309,7 +309,7 @@ dumpSchema(Archive *fout, if (g_verbose) write_msg(NULL, "reading user-defined tables\n"); - tblinfo = getTables(&numTables, finfo, numFuncs); + tblinfo = getTables(&numTables, finfo, numFuncs, tablename); if (g_verbose) write_msg(NULL, "reading index information\n"); |