Re: [HACKERS] Problem with pg_upgrade's directory write check on Windows

2011-07-25 Thread Robert Haas
On Sun, Jul 24, 2011 at 5:27 PM, Bruce Momjian br...@momjian.us wrote: Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of dom jul 24 01:46:08 -0400 2011: Robert Haas wrote: Should I fix this in pg_upgrade 9.1 for Windows or just in 9.2? ?The check works fine on

Re: [HACKERS] Problem with pg_upgrade's directory write check on Windows

2011-07-25 Thread Bruce Momjian
Robert Haas wrote: On Sun, Jul 24, 2011 at 5:27 PM, Bruce Momjian br...@momjian.us wrote: Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of dom jul 24 01:46:08 -0400 2011: Robert Haas wrote: Should I fix this in pg_upgrade 9.1 for Windows or just in 9.2? ?The check

Re: [HACKERS] Problem with pg_upgrade's directory write check on Windows

2011-07-24 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of dom jul 24 01:46:08 -0400 2011: Robert Haas wrote: Should I fix this in pg_upgrade 9.1 for Windows or just in 9.2? ?The check works fine on non-Windows. Seems worth back-patching to me. Attached patch applied and backpatched to 9.1. I was

Re: [HACKERS] Problem with pg_upgrade's directory write check on Windows

2011-07-24 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of dom jul 24 01:46:08 -0400 2011: Robert Haas wrote: Should I fix this in pg_upgrade 9.1 for Windows or just in 9.2? ?The check works fine on non-Windows. Seems worth back-patching to me. Attached patch applied

[HACKERS] Problem with pg_upgrade's directory write check on Windows

2011-07-23 Thread Bruce Momjian
Pg_upgrade writes temporary files (e.g. _dumpall output) into the current directory, rather than a temporary directory or the user's home directory. (This was decided by community discussion.) I have a check in pg_upgrade 9.1 to make sure pg_upgrade has write permission in the current directory:

Re: [HACKERS] Problem with pg_upgrade's directory write check on Windows

2011-07-23 Thread Andrew Dunstan
On 07/23/2011 08:45 AM, Bruce Momjian wrote: Pg_upgrade writes temporary files (e.g. _dumpall output) into the current directory, rather than a temporary directory or the user's home directory. (This was decided by community discussion.) I have a check in pg_upgrade 9.1 to make sure

Re: [HACKERS] Problem with pg_upgrade's directory write check on Windows

2011-07-23 Thread Bruce Momjian
Andrew Dunstan wrote: We do use access() in a few other places in our code, but not for directory permission checks. Any ideas on a solution? Will checking stat() work? Do I have to try creating a dummy file and delete it? That looks like the obvious solution - it's what came to my

Re: [HACKERS] Problem with pg_upgrade's directory write check on Windows

2011-07-23 Thread Robert Haas
On Sat, Jul 23, 2011 at 9:14 AM, Bruce Momjian br...@momjian.us wrote: Andrew Dunstan wrote: We do use access() in a few other places in our code, but not for directory permission checks. Any ideas on a solution?  Will checking stat() work?  Do I have to try creating a dummy file and

Re: [HACKERS] Problem with pg_upgrade's directory write check on Windows

2011-07-23 Thread Bruce Momjian
Robert Haas wrote: On Sat, Jul 23, 2011 at 9:14 AM, Bruce Momjian br...@momjian.us wrote: Andrew Dunstan wrote: We do use access() in a few other places in our code, but not for directory permission checks. Any ideas on a solution? ?Will checking stat() work? ?Do I have to try