postgresql/src
Tom Lane 510034ac83 Improve parallel restore's ability to cope with selective restore (-L option).
The original coding tended to break down in the face of modified restore
orders, as shown in bug #5626 from Albert Ullrich, because it would flip over
into parallel-restore operation too soon.  That causes problems because we
don't have sufficient dependency information in dump archives to allow safe
parallel processing of SECTION_PRE_DATA items.  Even if we did, it's probably
undesirable to allow that to override the commanded restore order.

To fix the problem of omitted items causing unexpected changes in restore
order, tweak SortTocFromFile so that omitted items end up at the head of
the list not the tail.  This ensures that they'll be examined and their
dependencies will be marked satisfied before we get to any interesting
items.

In HEAD and 9.0, we can easily change restore_toc_entries_parallel so that
all SECTION_PRE_DATA items are guaranteed to be processed in the initial
serial-restore loop, and hence in commanded order.  Only DATA and POST_DATA
items are candidates for parallel processing.  For them there might be
variations from the commanded order because of parallelism, but we should
do it in a safe order thanks to dependencies.

In 8.4 it's much harder to make such a guarantee.  I settled for not
letting the initial loop break out into parallel processing mode if
it sees a DATA/POST_DATA item that's not to be restored; this at least
prevents a non-restorable item from causing premature exit from the loop.
This means that 8.4 will be more likely to fail given a badly-ordered -L
list than 9.x, but we don't really promise any such thing will work anyway.
2010-08-21 13:59:50 +00:00
..
backend Bring some sanity to the trace_recovery_messages code and docs. 2010-08-19 22:55:10 +00:00
bin Improve parallel restore's ability to cope with selective restore (-L option). 2010-08-21 13:59:50 +00:00
include Fix failure of "ALTER TABLE t ADD COLUMN c serial" when done by non-owner. 2010-08-18 18:35:30 +00:00
interfaces Applied Zoltan's patch to fix a few memleaks in ecpg's pgtypeslib. 2010-08-17 11:06:26 +00:00
makefiles Allow for LDFLAGS_SL already having a value in Makefile.aix. 2010-07-06 03:41:02 +00:00
pl Allow USING and INTO clauses of plpgsql's EXECUTE to appear in either order. 2010-08-19 18:58:04 +00:00
port pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
template Don't try to force use of -no-cpp-precomp on OS X. It's been five years 2010-08-02 04:51:25 +00:00
test Fix incorrect logic in plpgsql for cleanup after evaluation of non-simple 2010-08-09 18:50:20 +00:00
timezone pgindent run for 9.0, second run 2010-07-06 19:19:02 +00:00
tools Mention why one C file fails pgindent. 2010-07-06 19:26:28 +00:00
tutorial Remove copyright mention of Andrew Yu, per author's permission. 2010-02-02 18:52:02 +00:00
bcc32.mak Remove old-style win32 client-only visual c++ build infrastructure for everything except 2007-03-05 14:18:38 +00:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Rethink the way walreceiver is linked into the backend. Instead than shoving 2010-01-20 09:16:24 +00:00
Makefile.global.in Accept slightly grotty coding in Makefile.global in order to keep the -L 2010-07-06 22:03:05 +00:00
Makefile.shlib Still more third thoughts: when linking shared libraries, LDFLAGS probably 2010-07-06 03:55:33 +00:00
nls-global.mk Avoid error from mkdir if no languages are to be installed 2010-05-13 14:35:28 +00:00
win32.mak Update supported standalone VC++ version to 7.1+ only, and fix 2007-08-03 10:47:11 +00:00