Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id DBAAC9F95B0 for ; Sun, 26 Aug 2007 21:12:15 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 71812-01-8 for ; Sun, 26 Aug 2007 21:12:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 510E69F95AF for ; Sun, 26 Aug 2007 21:11:58 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id l7R0Bw114136; Sun, 26 Aug 2007 20:11:58 -0400 (EDT) From: Bruce Momjian Message-Id: <200708270011.l7R0Bw114136@momjian.us> Subject: Re: Block size with pg_dump? In-Reply-To: <46D1F213.4010107@verizon.net> To: Jean-David Beyer Date: Sun, 26 Aug 2007 20:11:58 -0400 (EDT) CC: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL123] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/209 X-Sequence-Number: 29147 Jean-David Beyer wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > When I make a backup of a database, I put the output file directly on > magnetic tape; i.e., my command looks like this: > > pg_dump --file=/dev/st0 .... > > This way I do not have to worry if the total backup exceeds the size of a > file system, and it saves me the trouble of copying it to the tape as a > separate step. My current tapes will hold 20 GBytes raw or 40GBytes if I > enable hardware compression (assuming 2:1 compression happens). Now it says > in the documentation that if I use format c it will compress the data in > software, so I doubt the hardware compression will do much. > > I do not know what blocksize pg_dump uses, or if it insists on a particular > blocksize on input. > > Now my tape drive will work with any blocksize, but prefers 65536-byte > blocks. I do not see any options for this in pg_dump, but I could pipe the > output of pg_dump through dd I suppose to make any blocksize I want. > > On the way back, likewise I could pipe the tape through dd before giving it > to pg_restore. > > Does pg_dump care what blocksize it gets? If so, what is it? I assume you could pipe pg_dump into dd and specify the block size in dd. -- Bruce Momjian http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +