Re: pg_dump -Ft failed on Windows XP

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Yoshiyuki Asaba" <y-asaba(at)sraoss(dot)co(dot)jp>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump -Ft failed on Windows XP
Date: 2006-04-20 08:47:56
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA352CE@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
pg_dump_tempfile.patch application/octet-stream 1.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-04-20 10:34:24 Re: float8 regression test failure in head
Previous Message Pavel Stehule 2006-04-20 07:40:47 please change url for czech postgresql site