postgresql/src
Tom Lane 99e2076bc7 Fix O(N^2) behavior in pg_dump when many objects are in dependency loops.
Combining the loop workspace with the record of already-processed objects
might have been a cute trick, but it behaves horridly if there are many
dependency loops to repair: the time spent in the first step of findLoop()
grows as O(N^2).  Instead use a separate flag array indexed by dump ID,
which we can check in constant time.  The length of the workspace array
is now never more than the actual length of a dependency chain, which
should be reasonably short in all cases of practical interest.  The code
is noticeably easier to understand this way, too.

Per gripe from Mike Roest.  Since this is a longstanding performance bug,
backpatch to all supported versions.
2012-03-31 15:51:11 -04:00
..
backend Correct epoch of txid_current() when executed on a Hot Standby server. 2012-03-29 14:57:08 +01:00
bin Fix O(N^2) behavior in pg_dump when many objects are in dependency loops. 2012-03-31 15:51:11 -04:00
include Fix planner's handling of outer PlaceHolderVars within subqueries. 2012-03-24 16:21:48 -04:00
interfaces ecpg: Fix off-by-one error in memory copying 2012-03-11 01:03:09 +02:00
makefiles Fix pgxs.mk to always add --dbname=$(CONTRIB_TESTDB) to REGRESS_OPTS. 2011-08-24 15:17:03 -04:00
pl Fix GET DIAGNOSTICS for case of assignment to function's first variable. 2012-03-22 14:13:45 -04:00
port Stamp 9.1.3. 2012-02-23 17:53:36 -05:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Fix COPY FROM for null marker strings that correspond to invalid encoding. 2012-03-25 23:17:27 -04:00
timezone Update time zone data files to tzdata release 2011n. 2011-11-30 11:48:21 -05:00
tools Fix MSVC builds broken by xsubpp change 2011-11-27 01:23:00 -05:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -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 Make distprep and *clean build targets recurse into all subdirectories. 2011-07-03 13:55:27 -04:00
Makefile.shlib Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:50 -04:00
nls-global.mk Fix makefile logic to not break the build when xgettext is missing 2010-10-14 23:16:46 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00