Re: pg_dump
От | Wasim Devale |
---|---|
Тема | Re: pg_dump |
Дата | |
Msg-id | CAB5fag7=axqdG1HMroNWa7Q4r7T3oZNj_KeqC5ZkUoudKispaQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pg_dump (Wasim Devale <wasimd60@gmail.com>) |
Список | pgsql-admin |
Please let me know your inputs.
On Tue, 13 Aug, 2024, 11:52 am Wasim Devale, <wasimd60@gmail.com> wrote:
I did one thing, we can exclude the toast table in the pg_dump command that has the BLOBS data for a particular table.
--exclude-table-data=pg_toast.pg_toast_10176226
Thanks,
WasimOn Tue, 13 Aug, 2024, 12:48 am Holger Jakobs, <holger@jakobs.com> wrote:Am 12.08.24 um 21:09 schrieb Wasim Devale:
> Hi All
>
> Please let me know if the below option persists while using pg_dump
> command:
>
> -t table_name --exclude-column column_name
>
> I have a table with a column having bytea data type (BLOBS). I just
> want to exclude this in the dump file as it is of 99GB but I want the
> other data in the same table which is of only 22MB.
>
> Please let me know any work around this.
>
> I used this option in pg_dump but that didn't work:
>
> --exclude-table-data = table_name
>
> PG version 12.19
>
> Thanks,
> Wasim
No, pg_dump can only dump complete tables.
An alternative would be exporting the result of a select command via
COPY or \copy to a file, which can easily be read again with COPY or \copy
COPY is an SQL command and has to be used by a superuser because it
writes to (or reads from) a file on the server.
\copy is a psql command and thus can only be executed in psql (not any
other client) and by any user, because it writes to (or reads from) a
file on the client computer.
Kind Regards,
Holger
--
Holger Jakobs, Bergisch Gladbach
В списке pgsql-admin по дате отправления: