Leaving out a schema from the dump/restore

From: "Tobias Herp" <tobias(dot)herp(at)gmx(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Leaving out a schema from the dump/restore
Date: 2006-08-14 09:39:47
Message-ID: 20060814093947.177130@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 would be 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 superuser account.

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

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Godoy 2006-08-14 12:09:51 Re: Best approach for a "gap-less" sequence
Previous Message Philippe Lang 2006-08-14 09:32:14 Re: Migrating PostgreSQL database to MySQL/MS Access