postgresql/src
Tom Lane 8a504a3639 Make pg_dump emit more accurate dependency information.
While pg_dump has included dependency information in archive-format output
ever since 7.3, it never made any large effort to ensure that that
information was actually useful.  In particular, in common situations where
dependency chains include objects that aren't separately emitted in the
dump, the dependencies shown for objects that were emitted would reference
the dump IDs of these un-dumped objects, leaving no clue about which other
objects the visible objects indirectly depend on.  So far, parallel
pg_restore has managed to avoid tripping over this misfeature, but only
by dint of some crude hacks like not trusting dependency information in
the pre-data section of the archive.

It seems prudent to do something about this before it rises up to bite us,
so instead of emitting the "raw" dependencies of each dumped object,
recursively search for its actual dependencies among the subset of objects
that are being dumped.

Back-patch to 9.2, since that code hasn't yet diverged materially from
HEAD.  At some point we might need to back-patch further, but right now
there are no known cases where this is actively necessary.  (The one known
case, bug #6699, is fixed in a different way by my previous patch.)  Since
this patch depends on 9.2 changes that made TOC entries be marked before
output commences as to whether they'll be dumped, back-patching further
would require additional surgery; and as of now there's no evidence that
it's worth the risk.
2012-06-25 21:21:18 -04:00
..
backend Tighten up includes in sinvaladt.h, twophase.h, proc.h 2012-06-25 18:40:40 -04:00
bin Make pg_dump emit more accurate dependency information. 2012-06-25 21:21:18 -04:00
include Tighten up includes in sinvaladt.h, twophase.h, proc.h 2012-06-25 18:40:40 -04:00
interfaces Replace int2/int4 in C code with int16/int32 2012-06-25 01:51:46 +03:00
makefiles Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
pl Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
port Stamp HEAD as 9.3devel. 2012-06-13 20:03:02 -04:00
template Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
test Share RI trigger code between NO ACTION and RESTRICT cases. 2012-06-19 14:31:54 -04:00
timezone Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
tools Remove 'for' loop perltidy argument, and move args to perltidyrc file. 2012-06-16 10:12:50 -04:00
tutorial Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02: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 Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Fix pg_config.h make rule 2012-05-07 21:28:38 +03:00
Makefile.shlib Remove BSD/OS (BSDi) port. There are no known users upgrading to 2012-05-03 10:58:44 -04:00
nls-global.mk Lots of doc corrections. 2012-04-23 22:43:09 -04:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00