Re: Dump a database excluding one table DATA?

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Dump a database excluding one table DATA?
Дата
Msg-id 201108190705.37995.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Re: Dump a database excluding one table DATA?  (Dmitry Koterov <dmitry@koterov.ru>)
Список pgsql-general
On Thursday, August 18, 2011 3:25:59 pm Dmitry Koterov wrote:
> Mmm, --disable-triggers is not surely enough - we also have RULEs and (much
> worse) INDEXes.
>
> If we create all indices and then restore all data, it is MUCH SLOWER than
> restore the data first and then - create all indices.
> So I think that there is no work-around really...

Yes there is. Do the schema only dump of the table in question, comment out the
Indexes and rules you don't want. Load the data. Go back to the schema dump
comment out the table and uncomment the Indexes/rules,etc .
Or
Write a script that does the same thing automatically.


>
> I propose to include an option to pg_dump to skip several tables data
> restoration. :-)
>

I thought you where looking to exclude only one table. As you found out the
dependency issues for one table can be a problem. Doing more than one makes the
process even more brittle.

--
Adrian Klaver
adrian.klaver@gmail.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Andy Colson
Дата:
Сообщение: Re: Getting value of bind variables
Следующее
От: "Gauthier, Dave"
Дата:
Сообщение: Need linux uid in pg-psql