Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 03E249FB9BD for ; Fri, 9 Mar 2007 10:06:18 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 63009-02 for ; Fri, 9 Mar 2007 10:06:05 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id DC9B59FB742 for ; Fri, 9 Mar 2007 10:06:10 -0400 (AST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1HPfgx-0005DL-1J for pgsql-admin@postgresql.org; Fri, 09 Mar 2007 15:03:31 +0100 Received: from pirus.securax.be ([213.16.46.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Mar 2007 15:03:31 +0100 Received: from milen by pirus.securax.be with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Mar 2007 15:03:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-admin@postgresql.org From: "Milen A. Radev" Subject: Re: Pg_dump and bytaA Date: Fri, 09 Mar 2007 16:02:49 +0200 Lines: 52 Message-ID: References: <53561.85.206.198.223.1173384127.squirrel@fmf.vtu.lt> <200703091150.09431.achill@matrix.gatewaynet.com> <200703091518.04492.achill@matrix.gatewaynet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: pirus.securax.be User-Agent: Thunderbird 2.0b2 (Windows/20070116) In-Reply-To: <200703091518.04492.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/36 X-Sequence-Number: 24860 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