Leaving out a schema from the dump/restore

Поиск
Список
Период
Сортировка
От Tobias Herp
Тема Leaving out a schema from the dump/restore
Дата
Msg-id 20060814093947.177130@gmx.net
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Jim Bryan
Дата:
Сообщение: prepared statement already exists
Следующее
От: "macgillivary"
Дата:
Сообщение: Re: Migrating PostgreSQL database to MySQL/MS Access