diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-07 22:48:34 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-07 22:48:34 +0000 |
| commit | f033f6d28b014ff21c8ed250f55062c2fb1b12e8 (patch) | |
| tree | d2ad3729f10178b9343b19ba6a0f7d415803c3d6 /src/bin/pg_dump/pg_backup_archiver.h | |
| parent | 05f43650fcf008a12dd92db4d1ae15c43046e62c (diff) | |
| download | postgresql-f033f6d28b014ff21c8ed250f55062c2fb1b12e8.tar.gz | |
Modify parallel pg_restore to track pending and ready items by means of
two new lists, rather than repeatedly rescanning the main TOC list.
This avoids a potential O(N^2) slowdown, although you'd need a *lot*
of tables to make that really significant; and it might simplify future
improvements in the scheduling algorithm by making the set of ready
items more easily inspectable. The original thought that it would
in itself result in a more efficient job dispatch order doesn't seem
to have been borne out in testing, but it seems worth doing anyway.
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.h')
| -rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h index 710dec019a..fa6db407f2 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -17,7 +17,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.81 2009/08/04 21:56:09 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.82 2009/08/07 22:48:34 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -314,7 +314,8 @@ typedef struct _tocEntry void *formatData; /* TOC Entry data specific to file format */ /* working state (needed only for parallel restore) */ - bool restored; /* item is in progress or done */ + struct _tocEntry *par_prev; /* list links for pending/ready items; */ + struct _tocEntry *par_next; /* these are NULL if not in either list */ bool created; /* set for DATA member if TABLE was created */ int depCount; /* number of dependencies not yet restored */ DumpId *lockDeps; /* dumpIds of objects this one needs lock on */ |
