Re: pg_dump -Ft failed on Windows XP

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Peter Eisentraut" <peter_e(at)gmx(dot)net>, <pgsql-hackers(at)postgresql(dot)org>, "Yoshiyuki Asaba" <y-asaba(at)sraoss(dot)co(dot)jp>
Subject: Re: pg_dump -Ft failed on Windows XP
Date: 2006-04-20 17:35:34
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCEA0F91E@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > Ok. Should be easy enough once the code is fine - can you
> comment on
> > the patch as sent, if the code itself looks right provided
> i wrap it
> > up in a function in port/?
>
> Not sure if the error handling is adequate --- are there any
> cases besides EEXIST that should loop?

Well, per docs I can get:
EACCES (will certainly fail again since we're still working the same
directory)
EEXIST (covered)
EINVAL = invalid oflag or pmode, which should never happen
EMFILE = too many open files (that would be the one, but I doubd it'd
help that much)
ENOENT = path ont found (would happen agai non retry)

> A look at
> http://msdn.microsoft.com/library/default.asp?url=/library/en-
> us/vclib/html/_crt__tempnam.2c_._wtempnam.2c_.tmpnam.2c_._wtmpnam.asp
>
> suggests that tempnam() is also pretty fragile, esp. if
> you're passing NULLs. Apparently it won't work at all if TMP
> isn't set?

I'm not *too* concerned about that, since TMP is normally set by the OS
itself. There's one set in the "system environment" (to c:\windows\temp
or whatrever) and then it's overridden by one set by the OS when it
loads a user profile.

Also to the point, what would you fall back to?

//Magnus

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-04-20 17:55:21 Re: pg_dump -Ft failed on Windows XP
Previous Message Martijn van Oosterhout 2006-04-20 17:25:15 Re: Unresolved Win32 bug reports