postgresql/src/bin/pg_dump
Tom Lane 51fc613348 Fix a performance problem in pg_dump's dump order selection logic.
findDependencyLoops() was not bright about cases where there are multiple
dependency paths between the same two dumpable objects.  In most scenarios
this did not hurt us too badly; but since the introduction of section
boundary pseudo-objects in commit a1ef01fe16,
it was possible for this code to take unreasonable amounts of time (tens
of seconds on a database with a couple thousand objects), as reported in
bug #11033 from Joe Van Dyk.  Joe's particular problem scenario involved
"pg_dump -a" mode with long chains of foreign key constraints, but I think
that similar problems could arise with other situations as long as there
were enough objects.  To fix, add a flag array that lets us notice when we
arrive at the same object again while searching from a given start object.
This simple change seems to be enough to eliminate the performance problem.

Back-patch to 9.1, like the patch that introduced section boundary objects.
2014-07-25 19:48:48 -04:00
..
po Translation updates 2014-07-21 01:04:46 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
common.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
compress_io.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
compress_io.h Update copyrights for 2013 2013-01-01 17:15:01 -05:00
dumputils.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
dumputils.h Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
keywords.c Update copyrights for 2013 2013-01-01 17:15:01 -05:00
Makefile Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
nls.mk Translation updates 2013-09-02 02:28:21 -04:00
parallel.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
parallel.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_backup.h Add parallel pg_dump option. 2013-03-24 11:27:20 -04:00
pg_backup_archiver.c Fix pg_restore's processing of old-style BLOB COMMENTS data. 2014-06-12 20:14:39 -04:00
pg_backup_archiver.h pgindent run for release 9.3 2013-05-29 16:58:43 -04:00
pg_backup_custom.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_backup_db.c Fix pg_restore's processing of old-style BLOB COMMENTS data. 2014-06-12 20:14:39 -04:00
pg_backup_db.h pg_dump: Further reduce reliance on global variables. 2012-02-07 10:07:02 -05:00
pg_backup_directory.c Properly check for readdir/closedir() failures 2014-03-21 13:45:11 -04:00
pg_backup_null.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_backup_tar.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_backup_tar.h Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant. 2012-09-28 15:19:15 -04:00
pg_backup_utils.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_backup_utils.h Move some pg_dump function around. 2013-03-27 18:10:40 +02:00
pg_dump.c pg_upgrade: preserve database and relation minmxid values 2014-07-02 15:29:38 -04:00
pg_dump.h pg_upgrade: preserve database and relation minmxid values 2014-07-02 15:29:38 -04:00
pg_dump_sort.c Fix a performance problem in pg_dump's dump order selection logic. 2014-07-25 19:48:48 -04:00
pg_dumpall.c pg_upgrade: preserve database and relation minmxid values 2014-07-02 15:29:38 -04:00
pg_restore.c Move some pg_dump function around. 2013-03-27 18:10:40 +02:00