Re: Simpler dump? - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: Simpler dump?
Date
Msg-id 475D3C26.5010405@wildenhain.de
Whole thread Raw
In response to Re: Simpler dump?  (Ted Byers <r.ted.byers@rogers.com>)
Responses Re: Simpler dump?
List pgsql-general
Hi Ted,

Ted Byers wrote:
> Thanks Uwe
>
> This is a great start.  It reduces the dump from 2 MB
> down to 167K, but out of 6833 lines of SQL, 5744
> relate to the public schema in the DB, and I didn't
> touch that.  It has over a dozen types, 419 functions,
> &c., that were put there by postgresql the moment I
> created the database.  I'd expect the same stuff to be
> there the moment I issue the create database directive
> on the host machine, so all I really want is the dozen
> sequences, two dozen tables, and the suite of
> constraints I created, all in the schema specific to
> my new DB.

Well thats usually not the case unless you changed
the default database per accident. You can hope but
not be sure to find the same situation on your
server.

> Is there a reason pg_dump dumps the stuff in public
> even though that stuff seems to be created, and
> therefore present, in every database I create on a
> given server instance?  Isn't that duplication a waste
> of space, and it's presence in the dump a waste of CPU
> cycles?

Well, at the moment you seem to waste CPU cycles, network
bandwith and storage on the mailinglist server by not
just looking at the manual of pg_dump, which has for example
goodies as:

-n schema
--schema=schema
               Dump  only schemas matching schema; this selects both the
               ...


HTH ;)

Tino

pgsql-general by date:

Previous
From: Ted Byers
Date:
Subject: Re: Simpler dump?
Next
From: Richard Huxton
Date:
Subject: Re: Simpler dump?