Re: pg_dump -Ft failed on Windows XP - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pg_dump -Ft failed on Windows XP
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA352CE@algol.sollentuna.se
Whole thread Raw
In response to pg_dump -Ft failed on Windows XP  (Yoshiyuki Asaba <y-asaba@sraoss.co.jp>)
Responses Re: pg_dump -Ft failed on Windows XP  (Peter Eisentraut <peter_e@gmx.net>)
Re: pg_dump -Ft failed on Windows XP  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> I got the following message when I ran pg_dump with -Ft
> option on Windows XP.
>
> > pg_dump -V
> pg_dump (PostgreSQL) 8.1.2
>
> > pg_dump -Ft test > C:\backup\xxx.out
> pg_dump: [tar archiver] could not generate temporary file
> name: Permission denied
>
>
> pg_dump calls tmpfile() in pg_backup_tar.c:tarOpen(). Win32's
> tmpfile() creates the file into root folder. But
> non-administrator users can't create files into root folder.
> So, I think it fails that non-administrator users run pg_dump
> with -Ft option.

Indeed, that's definitly a bug. Quick patch attached. It does appear to
work, but there may be a better way?

//Magnus

Attachment

pgsql-hackers by date:

Previous
From: "Pavel Stehule"
Date:
Subject: please change url for czech postgresql site
Next
From: Bruce Momjian
Date:
Subject: Re: float8 regression test failure in head