You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Fix a performance problem in pg_dump's dump order selection logic.
findDependencyLoops() was not bright about cases where there are multipledependency paths between the same two dumpable objects. In most scenariosthis did not hurt us too badly; but since the introduction of sectionboundary pseudo-objects in commita1ef01f,it was possible for this code to take unreasonable amounts of time (tensof seconds on a database with a couple thousand objects), as reported inbug #11033 from Joe Van Dyk. Joe's particular problem scenario involved"pg_dump -a" mode with long chains of foreign key constraints, but I thinkthat similar problems could arise with other situations as long as therewere enough objects. To fix, add a flag array that lets us notice when wearrive 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.