From: Milen A. Radev <milen@radev.net>
To: pgsql-admin@postgresql.org
Subject: Re: Pg_dump and bytaA
Date: Fri, 09 Mar 2007 16:02:49 +0200
Message-ID: <esrpeb$jnv$1@sea.gmane.org> (raw)
In-Reply-To: <200703091518.04492.achill@matrix.gatewaynet.com>
References: <53561.85.206.198.223.1173384127.squirrel@fmf.vtu.lt>
<200703091150.09431.achill@matrix.gatewaynet.com>
<esrm2i$63o$1@sea.gmane.org>
<200703091518.04492.achill@matrix.gatewaynet.com>
Achilleas Mantzios wrote:
> Στις Παρασκευή 09 Μάρτιος 2007 15:05, ο/η Milen A. Radev έγραψε:
>> Achilleas Mantzios wrote:
>>> Στις Παρασκευή 09 Μάρτιος 2007 11:00, ο/η Lukas έγραψε:
>>>> Hello,
>>>>
>>>> pg_dump can avoid bloob fields (it can dumb without blobs), but as I
>>>> understand byteA is not bloob, so in this case what is blob? I did not
>>>> found such type as blob..
>>> Take a look at
>>> http://www.postgresql.org/docs/7.4/interactive/largeobjects.html
>>>
>>> You might also consider writing a program for transforming your db/app
>>> from bytea based to large object based, and simply exclude blobs
>>> from your pg_dump's.
>> How to exclude them from a custom dump? (That's for version 8.1/8.2)
>
> you just dont include them :)
Yes, and how exactly you do not include them?
For example - this is my backup script that is executed nightly:
-------------------------------------------------------------------
PSQL=/usr/local/pgsql/bin/psql
PG_DUMP=/usr/local/pgsql/bin/pg_dump
PG_DUMPALL=/usr/local/pgsql/bin/pg_dumpall
$PG_DUMPALL -U postgres --globals-only > $BACKUPDIR/pg_globals.sql
for db in `$PSQL -U postgres -d template1 -t -c "SELECT datname FROM
pg_catalog.pg_database WHERE datname "\!"~ 'template(0|1)';"`
do
echo -n -e "Dumping database $db...\t\t"
$PG_DUMP -U postgres --format=c $db > $BACKUPDIR/$db.dump
echo "done."
done
-------------------------------------------------------------------
Guess what? There was a special command-line parameter for including
large objects in the custom/tar dump until version 8.1
(http://www.postgresql.org/docs/8.0/static/app-pgdump.html, look for
"--blobs"). Now they are included by default AND could not be excluded,
at least I could not find a way to do that
(http://www.postgresql.org/docs/8.1/static/app-pgdump.html).
So what are you suggesting?
--
Milen A. Radev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: milen@radev.net
Subject: Re: Pg_dump and bytaA
In-Reply-To: <esrpeb$jnv$1@sea.gmane.org>
References: <53561.85.206.198.223.1173384127.squirrel@fmf.vtu.lt> <200703091150.09431.achill@matrix.gatewaynet.com> <esrm2i$63o$1@sea.gmane.org> <200703091518.04492.achill@matrix.gatewaynet.com> <esrpeb$jnv$1@sea.gmane.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox