X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id F2C4B9FA5E9 for ; Wed, 31 May 2006 17:12:31 -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 72671-02 for ; Wed, 31 May 2006 17:12:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from trolak.mydnsbox2.com (ns1.mydnsbox2.com [207.44.142.118]) by postgresql.org (Postfix) with ESMTP id 79D8C9FA5E1 for ; Wed, 31 May 2006 17:12:22 -0300 (ADT) Received: from [192.168.1.227] (68.143.134.146.nw.nuvox.net [68.143.134.146]) (authenticated (0 bits)) by trolak.mydnsbox2.com (8.11.6/8.11.6) with ESMTP id k4VJa4c26880; Wed, 31 May 2006 14:36:04 -0500 Message-ID: <447DF8A1.7070207@dunslane.net> Date: Wed, 31 May 2006 16:12:17 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060201 SeaMonkey/1.0 MIME-Version: 1.0 To: David Fetter , Andreas Pflug , Chris Browne , pgsql-hackers@postgresql.org Subject: Re: Possible TODO item: copy to/from pipe References: <447DC5B4.4080407@pse-consulting.de> <60ac8yt74e.fsf@dba2.int.libertyrms.com> <447DDCC3.7040304@pse-consulting.de> <447DE485.6040402@dunslane.net> <20060531191348.GK27220@fetter.org> <447DEED7.70306@dunslane.net> <20060531195812.GB12167@surnet.cl> In-Reply-To: <20060531195812.GB12167@surnet.cl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/1355 X-Sequence-Number: 84220 Alvaro Herrera wrote: > Andrew Dunstan wrote: > >> >> But why is that hugely better than piping psql output to gzip? >> > > psql output has already travelled over the network. > > As I understand Tom's suggestion, it does not involve compression of over the wire data. He suggested that on the server you would be able to do: COPY mytable TO '| gzip >/home/tgl/mytable.dump.gz'; and that there could be an equivalent extension on psql's \copy command, as an alternative to doing psql -c "COPY mytable TO stdout" mydb | gzip ... It's the second piece especially that seems to me unnecessary. So I am still unconvinced. cheers andrew