Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] pg_dump -Ft failed on Windows XP

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Zeugswetter Andreas DCP SD <ZeugswetterA(at)spardat(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <mha(at)sollentuna(dot)net>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Yoshiyuki Asaba <y-asaba(at)sraoss(dot)co(dot)jp>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] pg_dump -Ft failed on Windows XP
Date: 2006-06-27 01:18:44
Message-ID: 200606270118.k5R1IiW02062@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Modified patch attached and applied to HEAD and 8.1.X.

I restructured the loop exit, and used the symbols without the leading
underscores.  I didn't see any Win32 underscore symbol usage in our
existing code.

Thanks.

-------------------------------------------------------------------------

Zeugswetter Andreas DCP SD wrote:
> 
> > >> 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.
> > 
> > OK, then maybe not having it would be equivalent to /tmp-not-writable
> > on Unix, ie, admin error.
> > 
> > > Also to the point, what would you fall back to?
> > 
> > Current directory maybe?
> 
> It tries \ (tested on Win 2000), if the dir argument is NULL and TMP is
> not set.
> But TMP is usually set. 
> 
> Attached is a working version not yet adapted to port/.
> - memoryleak fixed
> - use _tmpname and _fdopen not the compatibility tmpname and fdopen
> (imho only cosmetic)
> - EACCES fixed (Win2000 needs _S_IREAD | _S_IWRITE or fails with EACCES,
> even as Admin)
> - I suggest adding a prefix pg_temp_ (for leftover temp files after
> crash, 
> 	the name I get is then usually pg_temp_2)
> 
> Andreas

Content-Description: pg_dump_tempfile.patch.txt

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

-- 
  Bruce Momjian   bruce(at)momjian(dot)us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Attachment: /rtmp/diff
Description: text/x-diff (1.3 KB)

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-06-27 01:25:57
Subject: Re: [HACKERS] PQescapeIdentifier
Previous:From: Bruce MomjianDate: 2006-06-27 00:03:30
Subject: Re: [HACKERS] PQescapeIdentifier

pgsql-patches by date

Next:From: Tom LaneDate: 2006-06-27 01:25:57
Subject: Re: [HACKERS] PQescapeIdentifier
Previous:From: Bruce MomjianDate: 2006-06-27 00:11:13
Subject: Re: LDAP lookup of connection parameters

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group