Leaving out a schema from the dump/restore - Mailing list pgsql-general

From Tobias Herp
Subject Leaving out a schema from the dump/restore
Date
Msg-id 20060814093947.177130@gmx.net
Whole thread Raw
List pgsql-general
Hi,

I have a database with a lot of schemas; now one schema has been added, re-integrating a former separate database (of
course,there are good reasons to do so). This "new" schema contains very much data which is rarely changed; thus, it
wouldbe sufficient to save it much less often than the rest of the database (e.g. once a month). 

So what I'd like to do is do the daily dump with this schema (i.e. its data) dropped.

I read the "Disabling and enabling constraints and triggers to make pg_restore work" thread
(http://groups.google.de/group/pgsql.general/browse_thread/thread/83cc7097eb765220);yes, I can use the database
superuseraccount. 

So, are there any contraindications to do create a working backup like so:

 - dump the schemas
 - "update pg_catalog.pg_class set relchecks=0;"
 - dump all the data minus the one schema to be left out
 - "update pg_catalog.pg_class set relchecks=1;"

The data of the missing schema would be restored separately; I'd have to support this with scripts both for Linux and
Windows.
--
Tia,

Tobias

pgsql-general by date:

Previous
From: Jim Bryan
Date:
Subject: prepared statement already exists
Next
From: "macgillivary"
Date:
Subject: Re: Migrating PostgreSQL database to MySQL/MS Access