Unix Technical Forum

Re: pg_dump -Ft failed on Windows XP

This is a discussion on Re: pg_dump -Ft failed on Windows XP within the pgsql Hackers forums, part of the PostgreSQL category; --> > > If the implementation is such that it tries to create the file in a > > directory ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2008, 03:04 AM
Magnus Hagander
 
Posts: n/a
Default Re: pg_dump -Ft failed on Windows XP

> > If the implementation is such that it tries to create the file in a
> > directory that the user does not have write permission to,

> it's a bug.
>
> Well, I think it would be a valid implementation on Unix to
> always try to create the file in /tmp, which'd likely fail if
> someone had revoked world write on /tmp --- but doing the
> latter is administrator error, not a library fault.
>
> OTOH, if / is *supposed* to be non world writable on Win32,
> then trying to create temp files there indicates a seriously
> brain-damaged library.
> It should be trying to create the file in a place where the
> user is expected to have permission to do it.


Prior to Windows XP, users had write permissions in the root IIRC. They
definitly had in NT4, but I think they did in 2000 as well.


> Has anyone looked to see with tmpfile() actually does though?
> I'm a bit surprised that it doesn't create stuff in the same
> directory as tmpnam().
> I wonder if Magnus and Yoshiyuki are testing under different
> conditions.


I have repeated the problem with CVS head on XP SP2. It *does* create it
there (or rather, it tries to).

tmpnam() returns a file in the current dir per documentation, but I see
it generating one in the root instead.
tempnam() uses TMP environment variable.

tmpfile() and tmpnam() both use the same function to generate the
filename.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-12-2008, 03:04 AM
Tom Lane
 
Posts: n/a
Default Re: pg_dump -Ft failed on Windows XP

"Magnus Hagander" <mha@sollentuna.net> writes:
> I have repeated the problem with CVS head on XP SP2. It *does* create it
> there (or rather, it tries to).


> tmpnam() returns a file in the current dir per documentation, but I see
> it generating one in the root instead.
> tempnam() uses TMP environment variable.


> tmpfile() and tmpnam() both use the same function to generate the
> filename.


Hm. I guess I concur with Peter's conclusion: the cleanest fix is to
put our own implementation of tmpfile() into src/port/.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:56 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com