X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BABA29FA2FA for ; Sat, 6 May 2006 20:26:12 -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 83188-04 for ; Sat, 6 May 2006 20:26:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from candle.pha.pa.us (candle.pha.pa.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 3352E9FA42B for ; Sat, 6 May 2006 20:26:05 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id k46NQ2k28222; Sat, 6 May 2006 19:26:02 -0400 (EDT) From: Bruce Momjian Message-Id: <200605062326.k46NQ2k28222@candle.pha.pa.us> Subject: Re: pg_dump docs should mention TMPDIR In-Reply-To: <17708.1146678550@sss.pgh.pa.us> To: Tom Lane Date: Sat, 6 May 2006 19:26:02 -0400 (EDT) CC: Mark Stosberg , pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM1146957962-27916-1_ Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/7 X-Sequence-Number: 3534 --ELM1146957962-27916-1_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Tom Lane wrote: > Mark Stosberg writes: > > A suggested addition to the pg_dump docs: > > This would be an extension to the documentation for the "tar" format: > > > The tar format needs some space to create temporary files. By default > > "/tmp" is used. On systems with small "/tmp" partitions, set the > > "TMPDIR" environment variable to a location with more space, such as > > "/usr/tmp". > > There is no reference to TMPDIR in the pg_dump code. It may be that > tmpfile() pays attention to such an environment variable on your > machine, but there's nothing about it in the Single Unix Spec. > > > Also, I would like it if the pg_dump docs more assertively recommended > > one of the "tar" or "custom" formats. They seem very similiar. > > Yeah. I think it should specifically recommend custom format. The only > reason for using tar format would be if you want to process the file > later with something other than pg_restore. I have applied the attached patch to recommend more clearly custom pg_dump format over tar, by showing custom format examples first. -- Bruce Momjian http://candle.pha.pa.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + --ELM1146957962-27916-1_ Content-Transfer-Encoding: 7bit Content-Type: text/x-diff Content-Disposition: inline; filename="/rtmp/diff" Index: doc/src/sgml/ref/pg_dump.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/pg_dump.sgml,v retrieving revision 1.83 diff -c -c -r1.83 pg_dump.sgml *** doc/src/sgml/ref/pg_dump.sgml 15 Apr 2006 18:11:16 -0000 1.83 --- doc/src/sgml/ref/pg_dump.sgml 6 May 2006 23:23:23 -0000 *************** *** 244,271 **** ! t ! tar ! Output a tar archive suitable for input into ! pg_restore. Using this archive format ! allows reordering and/or exclusion of database objects ! at the time the database is restored. It is also possible to limit ! which data is reloaded at restore time. ! c ! custom ! Output a custom archive suitable for input into ! pg_restore. This is the most flexible ! format in that it allows reordering of loading data as well ! as object definitions. This format is also compressed by default. --- 244,271 ---- ! c ! custom ! Output a custom archive suitable for input into ! pg_restore. This is the most flexible ! format in that it allows reordering of loading data as well ! as object definitions. This format is also compressed by default. ! t ! tar ! Output a tar archive suitable for input into ! pg_restore. Using this archive format ! allows reordering and/or exclusion of database objects ! at the time the database is restored. It is also possible to limit ! which data is reloaded at restore time. *************** *** 665,675 **** ! To dump a database called mydb to a tar file: ! $ pg_dump -Ft mydb > db.tar --- 665,675 ---- ! To dump a database called mydb to a file in custom format: file: ! $ pg_dump -Fc mydb > db.out *************** *** 677,683 **** To reload this dump into an existing database called newdb: ! $ pg_restore -d newdb db.tar --- 677,683 ---- To reload this dump into an existing database called newdb: ! $ pg_restore -d newdb db.out --ELM1146957962-27916-1_--