Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0f80200

Browse files
committed
Fix identify_locking_dependencies to reflect the fact that fix_dependencies
previously repointed TABLE dependencies to TABLE DATA. Mea culpa.
1 parent d287c9e commit 0f80200

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/bin/pg_dump/pg_backup_archiver.c

+7-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.166 2009/03/11 03:33:29 adunstan Exp $
18+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.167 2009/03/13 22:50:44 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -3732,8 +3732,11 @@ identify_locking_dependencies(TocEntry *te, TocEntry **tocsByDumpId)
37323732
return;
37333733

37343734
/*
3735-
* We assume the item requires exclusive lock on each TABLE item
3736-
* listed among its dependencies.
3735+
* We assume the item requires exclusive lock on each TABLE DATA item
3736+
* listed among its dependencies. (This was originally a dependency
3737+
* on the TABLE, but fix_dependencies repointed it to the data item.
3738+
* Note that all the entry types we are interested in here are POST_DATA,
3739+
* so they will all have been changed this way.)
37373740
*/
37383741
lockids = (DumpId *) malloc(te->nDeps * sizeof(DumpId));
37393742
nlockids = 0;
@@ -3742,7 +3745,7 @@ identify_locking_dependencies(TocEntry *te, TocEntry **tocsByDumpId)
37423745
DumpId depid = te->dependencies[i];
37433746

37443747
if (tocsByDumpId[depid - 1] &&
3745-
strcmp(tocsByDumpId[depid - 1]->desc, "TABLE") == 0)
3748+
strcmp(tocsByDumpId[depid - 1]->desc, "TABLE DATA") == 0)
37463749
lockids[nlockids++] = depid;
37473750
}
37483751

0 commit comments

Comments
 (0)