BUG #5384: pg_dump hard-codes use of /tmp - Mailing list pgsql-bugs

From Jon Nelson
Subject BUG #5384: pg_dump hard-codes use of /tmp
Date
Msg-id 201003191656.o2JGunds034382@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5384: pg_dump hard-codes use of /tmp  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5384
Logged by:          Jon Nelson
Email address:      jnelson@jamponi.net
PostgreSQL version: 8.4.2
Operating system:   openSUSE 11.2
Description:        pg_dump hard-codes use of /tmp
Details:

I was trying to dump a database (with --format=tar).
I noticed I kept running out of space, but that should not have been - I was
dumping to a filesystem with plenty of space.

strace to the rescue!

strace shows me that pg_dump is using /tmp - hardcoded because my TMPDIR
environment variable does *not* point to /tmp.

So, there are two issues:

1. why is pg_dump using a temporary directory (other than the $CWD) anyway?

2. More importantly, why is pg_dump ignoring TMPDIR ?

pgsql-bugs by date:

Previous
From: "Roberto Rivera Mardones"
Date:
Subject: BUG #5383: Problemas con GROUP BY
Next
From: Tom Lane
Date:
Subject: Re: segfault in pg 8.4, CurrentResourceOwner == NULL while processing SIGTERM