Re: pg_dump -Ft failed on Windows XP

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: pg_dump -Ft failed on Windows XP
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCEA0F91E@algol.sollentuna.se
обсуждение исходный текст
Ответ на pg_dump -Ft failed on Windows XP  (Yoshiyuki Asaba <y-asaba@sraoss.co.jp>)
Ответы Re: pg_dump -Ft failed on Windows XP  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Unresolved Win32 bug reports
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump -Ft failed on Windows XP