Re: Exclude pg_largeobject form pg_dump

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Exclude pg_largeobject form pg_dump
Дата
Msg-id 9268.1457451036@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Exclude pg_largeobject form pg_dump  (Andreas Joseph Krogh <andreas@visena.com>)
Ответы Re: Exclude pg_largeobject form pg_dump  (Andreas Joseph Krogh <andreas@visena.com>)
Список pgsql-general
Andreas Joseph Krogh <andreas@visena.com> writes:
> På tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>:
>  Do you care about not dumping the pg_largeobject table or not dumping
>  the data it contains?
>
> I have several tables with OID-columns and I'd like to dump my DB without any
> data in pg_largeobject (> 95% of the space is occupied by data in
> pg_largeobject).
> I've tried to exclude (using -T) the tables containing OID-columns but
> pg_largeobject is still dumped containing the data it seems.

A look at the pg_dump source code says that it skips blobs if any of
-s, -n, -t are used.  There's a -b switch to undo that and include
them anyway, but no "inverse -b" to skip them in an otherwise-complete
dump.

So you could do something along the lines of pg_dump -t '*' ...
although this will result in *all* non-schema-named objects being
excluded, I believe, which might be a problem.

            regards, tom lane


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Inserting JSON via Java PreparedStatment
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Re: Exclude pg_largeobject form pg_dump