Re: pg_dump in 7.4 - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: pg_dump in 7.4
Date
Msg-id GNELIHDDFBOCMGBFGEFOGEIPCEAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: pg_dump in 7.4  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> The thought that I'd been toying with is to build a list of inter-object
> dependencies (using pg_depend if available, else fall back on pg_dump's
> native wit, ie, the rather limited set of dependencies it already
> understands).  Then do a topological sort, preferring to maintain OID
> order in cases where the object ordering is underspecified.  When the
> sort fails (ie, there's a circular dependency) then modify the set of
> dumpable objects by breaking some object into two parts (a base
> declaration and an ALTER command); this changes the dependencies too.
> Repeat the sort and adjustment steps until the sort succeeds.
>
> If you're not familiar with topological sorts, look at Knuth or your
> favorite algorithms text.  There are one or two instances of the method
> in PG already (deadlock detection, for example).

C'mon - I _do_ have an honours degree in computer science ;)

I was actually trying to think of the correct term when i wrote my original
email.  I had 'PERT charts' in my head, but I couldn't remember the term for
the required order of activities - thanks for reminding me :)

Chris



pgsql-hackers by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: RC1?
Next
From: Bruce Momjian
Date:
Subject: ISDN installed