pg_dump docs should mention TMPDIR

Started by Mark Stosbergalmost 20 years ago6 messagesdocs
Jump to latest
#1Mark Stosberg
mark@summersault.com

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".

Also, I would like it if the pg_dump docs more assertively recommended
one of the "tar" or "custom" formats. They seem very similiar.

It woud also be nice to document that the full names "custom" and "tar" are
supported. Longer names can be nice for clarity.

( Unfortunately, wrong formats like "txx" also work instead of throwing
an error. )

Mark

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Mark Stosberg (#1)
Re: pg_dump docs should mention TMPDIR

Mark Stosberg <mark@summersault.com> 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.

regards, tom lane

#3Mark Stosberg
mark@summersault.com
In reply to: Mark Stosberg (#1)
Re: pg_dump docs should mention TMPDIR

On 2006-05-03, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Mark Stosberg <mark@summersault.com> 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.

Yes, on FreeBSD "man tmpfile()" documents the use of TMPDIR.

If TMPDIR isn't being respected globally, perhaps there /should/ be
logic in the code to make that so. Even on fairly modern FreeBSD
installs, sometimes "/tmp" only has 256 MB of room. There really should
be a reliable way to specify a different temporary directory.

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.

Thanks for the recommendation.

Is that any concern that over time newer pg_restore's won't read old
"custom" formats? That would be my only worry-- that the data would be
locked in a binary format which becomes unsupported.

Mark

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: pg_dump docs should mention TMPDIR

Tom Lane wrote:

Mark Stosberg <mark@summersault.com> 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. +

Attachments:

/rtmp/difftext/x-diffDownload+32-32
#5Bruce Momjian
bruce@momjian.us
In reply to: Mark Stosberg (#3)
Re: pg_dump docs should mention TMPDIR

Mark Stosberg wrote:

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.

Thanks for the recommendation.

Is that any concern that over time newer pg_restore's won't read old
"custom" formats? That would be my only worry-- that the data would be
locked in a binary format which becomes unsupported.

No, we wouldn't do that.

--
Bruce Momjian http://candle.pha.pa.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

#6Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#5)
Re: pg_dump docs should mention TMPDIR

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Mark Stosberg wrote:

Is that any concern that over time newer pg_restore's won't read old
"custom" formats? That would be my only worry-- that the data would be
locked in a binary format which becomes unsupported.

No, we wouldn't do that.

Right, I can't imagine that we'd abandon support for pg_dump custom
format without many versions' warning. AFAIK we still read pg_dump
output from 7.0 if not earlier ...

regards, tom lane