aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_archiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index e466ef4e9d7..85c92b3d4a8 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -3498,9 +3498,14 @@ restore_toc_entries_parallel(ArchiveHandle *AH)
* Do all the early stuff in a single connection in the parent. There's no
* great point in running it in parallel, in fact it will actually run
* faster in a single connection because we avoid all the connection and
- * setup overhead. Also, pg_dump is not currently very good about showing
- * all the dependencies of SECTION_PRE_DATA items, so we do not risk
- * trying to process them out-of-order.
+ * setup overhead. Also, pre-9.2 pg_dump versions were not very good
+ * about showing all the dependencies of SECTION_PRE_DATA items, so we do
+ * not risk trying to process them out-of-order.
+ *
+ * Note: as of 9.2, it should be guaranteed that all PRE_DATA items appear
+ * before DATA items, and all DATA items before POST_DATA items. That is
+ * not certain to be true in older archives, though, so this loop is coded
+ * to not assume it.
*/
skipped_some = false;
for (next_work_item = AH->toc->next; next_work_item != AH->toc; next_work_item = next_work_item->next)
@@ -4162,8 +4167,9 @@ fix_dependencies(ArchiveHandle *AH)
/*
* Count the incoming dependencies for each item. Also, it is possible
- * that the dependencies list items that are not in the archive at all.
- * Subtract such items from the depCounts.
+ * that the dependencies list items that are not in the archive at all
+ * (that should not happen in 9.2 and later, but is highly likely in
+ * older archives). Subtract such items from the depCounts.
*/
for (te = AH->toc->next; te != AH->toc; te = te->next)
{