Re: pg_dump.c

From: David Fetter <david(at)fetter(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump.c
Date: 2011-09-11 14:25:07
Message-ID: 20110911142507.GB18580@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 08, 2011 at 03:20:14PM -0400, Andrew Dunstan wrote:
>
> In the "refactoring Large C files" discussion one of the biggest
> files Bruce mentioned is pg_dump.c. There has been discussion in the
> past of turning lots of the knowledge currently embedded in this
> file into a library, which would make it available to other clients
> (e.g. psql). I'm not sure what a reasonable API for that would look
> like, though. Does anyone have any ideas?

Here's a sketch.

In essence, libpgdump should have the following areas of functionality:

- Discover the user-defined objects in the database.
- Tag each as pre-data, data, and post-data.
- Make available the dependency graph of the user-defined objects in the database.
- Enable the mechanical selection of subgraphs which may or may not be connected.
- Discover parallelization capability, if available.
- Dump requested objects of an arbitrary subset of the database,
optionally using such capability.

Then there's questions of scope, which I'm straddling the fence about.
Should there be separate libraries to transform and restore?

A thing I'd really like to have in a libdump would be to have the
RDBMS-specific parts as loadable modules, but that, too, could be way
out of scope for this.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

  • pg_dump.c at 2011-09-08 19:20:14 from Andrew Dunstan

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-09-11 15:26:59 Re: pg_dump.c
Previous Message Josh Kupershmidt 2011-09-11 14:11:49 Re: patch: Allow \dd to show constraint comments