Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?

Поиск
Список
Период
Сортировка
От Alanoly Andrews
Тема Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?
Дата
Msg-id 639EB5AE-141A-41A4-9DB8-B0A4A3C37F76@invera.com
обсуждение исходный текст
Ответ на Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?  (Vincent Veyron <vv.lists@wanadoo.fr>)
Ответы Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?
Список pgsql-admin
Thanks Vincent. But as I have already mentioned, excluding tables from the dump isn't an option. I want to keep the
dumpcomplete, but exclude a table (or more) from the restore. The procedure I have outlined does work well with any
tableexcept the ones which have a "large object " column.
 

Alanoly.

Sent from my iPhone

> On May 2, 2015, at 9:39 AM, Vincent Veyron <vv.lists@wanadoo.fr> wrote:
>
> On Fri, 1 May 2015 14:12:08 +0000
> Alanoly Andrews <alanolya@invera.com> wrote:
>
>> Hello,
>>
>> We have a database that has been unloaded using pg_dump. This database has a table with a field defined as "lo".
Whenrestoring this database to another system, we want to avoid loading this particular table as it is very large
(about8GB of blob data) and is not needed on the target system. I tried the following:
 
>> 1.      Create a list of all the tables in the pg_dump file using the -l option of pg_restore
>> 2.      Edit out the lines corresponding to the said table (with the "lo" column)
>> 3.      Run the pg_restore with the -L option to use the edited list of tables.
>
> use the -T option of pg_dump?
>
> http://www.postgresql.org/docs/9.4/static/app-pgdump.html
>
> -T table
> --exclude-table=table
>
> Do not dump any tables matching the table pattern.
>
>
>> I have found that what this does is to exclude only the non-lo fields of the table. So after the load, the table
itselfis not visible in the target system. But the actual blob data does get loaded since they are contained in the
pg_largeobjectsystem table. This table does not occur in the listing produced in step 1 above and so cannot be edited
out.Besides it is a system table and should not be excluded anyway.
 
>>
>> I'd appreciate some input on how I can get the blob data of a specific table to be excluded from a pg_restore. This
isan operation that we need to do on a monthly basis. We do not want to exclude the blobs from the dump itself (since
thewhole database is to be preserved as a monthly record), but only from the restore.
 
>>
>> Postgres 9.1.4 on AIX.
>>
>> Thanks.
>>
>> Alanoly Andrews.
>> Invera Inc.
>> Montreal, Canada.
>>
>>
>>
>>
>>
>>
>>  ________________________________
>>
>> If you no longer wish to receive any of our emails, click on
UNSUBSCRIBE.<mailto:unsubscribe@invera.com?subject=***Unsubscribe***>This e-mail may be privileged and/or confidential,
andthe sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the
informationit contains by other than an intended recipient is unauthorized. If you received this e-mail in error,
pleaseadvise me (by return e-mail or otherwise) immediately.
 
>>
>>
>>
>>
>> Si vous ne d?sirez plus recevoir de nos courriels, veuillez appuyer sur
D?SABONNEMENT.<mailto:unsubscribe@invera.com?subject=***Unsubscribe***>Ce courriel est confidentiel et prot?g?.
L'exp?diteurne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce
messageou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) d?sign?(s) est
interdite.Si vous recevez ce courriel par erreur, veuillez m'en aviser imm?diatement, par retour de courriel ou par un
autremoyen.
 
>
>
> --
>                    Salutations, Vincent Veyron
>
> https://legalcase.libremen.com/
> Legal case, contract and insurance claim management software

________________________________

If you no longer wish to receive any of our emails, click on
UNSUBSCRIBE.<mailto:unsubscribe@invera.com?subject=***Unsubscribe***>This e-mail may be privileged and/or confidential,
andthe sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the
informationit contains by other than an intended recipient is unauthorized. If you received this e-mail in error,
pleaseadvise me (by return e-mail or otherwise) immediately.
 

Si vous ne désirez plus recevoir de nos courriels, veuillez appuyer sur
DÉSABONNEMENT.<mailto:unsubscribe@invera.com?subject=***Unsubscribe***>Ce courriel est confidentiel et protégé.
L'expéditeurne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce
messageou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est
interdite.Si vous recevez ce courriel par erreur, veuillez m'en aviser immédiatement, par retour de courriel ou par un
autremoyen.
 

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

Предыдущее
От: Vincent Veyron
Дата:
Сообщение: Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] How to exclude blobs (large objects) from being loaded by pg_restore?