From: Tom Lane Date: Fri, 13 Mar 2009 22:50:44 +0000 (+0000) Subject: Fix identify_locking_dependencies to reflect the fact that fix_dependencies X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=590214cbdf4567ef1a5855b11aa2d8175c9d05e3;p=users%2Fsimon%2Fpostgres.git Fix identify_locking_dependencies to reflect the fact that fix_dependencies previously repointed TABLE dependencies to TABLE DATA. Mea culpa. --- diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index cb806d9c57..5394f275a4 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -3732,8 +3732,11 @@ identify_locking_dependencies(TocEntry *te, TocEntry **tocsByDumpId) return; /* - * We assume the item requires exclusive lock on each TABLE item - * listed among its dependencies. + * We assume the item requires exclusive lock on each TABLE DATA item + * listed among its dependencies. (This was originally a dependency + * on the TABLE, but fix_dependencies repointed it to the data item. + * Note that all the entry types we are interested in here are POST_DATA, + * so they will all have been changed this way.) */ lockids = (DumpId *) malloc(te->nDeps * sizeof(DumpId)); nlockids = 0; @@ -3742,7 +3745,7 @@ identify_locking_dependencies(TocEntry *te, TocEntry **tocsByDumpId) DumpId depid = te->dependencies[i]; if (tocsByDumpId[depid - 1] && - strcmp(tocsByDumpId[depid - 1]->desc, "TABLE") == 0) + strcmp(tocsByDumpId[depid - 1]->desc, "TABLE DATA") == 0) lockids[nlockids++] = depid; }