X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9B60D9FA3CD for ; Tue, 27 Jun 2006 21:45:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 29449-05 for ; Tue, 27 Jun 2006 21:45:23 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 5ECF69F9DCC for ; Tue, 27 Jun 2006 21:45:23 -0300 (ADT) Received: from [10.82.1.60] (docboy.decibel.org [65.86.67.34]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by noel.decibel.org (Postfix) with ESMTP id 5565F56423; Tue, 27 Jun 2006 19:45:21 -0500 (CDT) In-Reply-To: <10263.1151030346@sss.pgh.pa.us> References: <11486.1150909222@sss.pgh.pa.us> <5F1778F3-ACEA-44C3-B895-D651EF62CBBA@pervasive.com> <10263.1151030346@sss.pgh.pa.us> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <219F801D-2039-4729-8CEC-B9EEC0C2F3BF@pervasive.com> Cc: "Nicola Mauri" , pgsql-admin@postgresql.org Content-Transfer-Encoding: 7bit From: Jim Nasby Subject: Re: Dump size bigger than pgdata size? Date: Tue, 27 Jun 2006 19:15:39 -0500 To: Tom Lane X-Mailer: Apple Mail (2.750) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/265 X-Sequence-Number: 22227 On Jun 22, 2006, at 9:39 PM, Tom Lane wrote: > Jim Nasby writes: >> On Jun 21, 2006, at 12:00 PM, Tom Lane wrote: >>> This could be avoided by using COPY BINARY format, but I don't >>> see any >>> very nice way to do that in the context of pg_dump --- it needs to >>> intermix COPY data with SQL commands ... > >> Would the tar or custom format allow for this? IIRC, at least tar >> puts all the copied data into separate files... > > Well, you could sorta do that, but the case that would stop working is > pg_restore output to a plain text SQL script (and related issues > such as > the ability to use the feature in the context of pg_dumpall). Having > just gotten done fixing similar inconsistencies in pg_dump/pg_restore > for BLOBs, I'm not eager to re-introduce 'em for COPY BINARY ... Yeah, but how many people actually do that anyway? I can't really come up with a use-case for it, and I'm pretty sure there's other gains to be had by turning custom or tar format into more of a 'binary dump'. For one thing, that should ease the need to run the newer version of pg_dump when upgrading (if we put the requisite brains into pg_restore). I suppose we could put support in pg_restore to convert between BINARY and escaped as needed; or just disallow pg_restore from dumping SQL if there's binary data (maybe have it include copy statements that reference the specific files). -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461