Modify parallel pg_restore to track pending and ready items by means of
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Aug 2009 22:48:34 +0000 (22:48 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 Aug 2009 22:48:34 +0000 (22:48 +0000)
commit3c50e1e69183a799dfb9edaaee4af011b640b043
treec3822f3b0b95cf739dd5321abd58249e3485cb04
parent2e7f33a18eaa3a279d748feffe8ecd72fdee2eb5
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.
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.h