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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Problem with pg_upgrade's directory write check on Windows
Date: 2011-07-24 05:46:08
Message-ID: 201107240546.p6O5k8F01082@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas wrote:
> On Sat, Jul 23, 2011 at 9:14 AM, Bruce Momjian <bruce(at)momjian(dot)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 delete it?
> >>
> >> That looks like the obvious solution - it's what came to my mind even
> >> before reading this sentence.
> >
> > Well, the easy fix is to see if ALL_DUMP_FILE
> > ("pg_upgrade_dump_all.sql") exists, and if so remove it, and if not,
> > create it and remove it.
> >
> > 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 able to test both
code paths on my BSD machine by modifying the ifdefs. I will have
EnterpriseDB do further testing.

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

+ It's impossible for everything to be true. +

Attachment Content-Type Size
/rtmp/pg_upgrade.diff text/x-diff 2.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2011-07-24 10:50:37 Re: pgbench cpu overhead (was Re: lazy vxid locks, v1)
Previous Message Robert Haas 2011-07-24 03:14:50 Re: Initial Review: JSON contrib modul was: Re: Another swing at JSON