Re: Simpler dump?

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: Ted Byers <r(dot)ted(dot)byers(at)rogers(dot)com>
Cc: "Uwe C(dot) Schroeder" <uwe(at)oss4u(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Simpler dump?
Date: 2007-12-10 13:16:22
Message-ID: 475D3C26.5010405@wildenhain.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2007-12-10 14:06:26 Re: [GENERAL] full_page_writes = off?
Previous Message Ted Byers 2007-12-10 13:11:15 Re: Simpler dump?