Re: pgwin32_open returning EINVAL - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: pgwin32_open returning EINVAL
Date
Msg-id 20071220124345.GH21084@svr2.hagander.net
Whole thread Raw
In response to Re: pgwin32_open returning EINVAL  ("Trevor Talbot" <quension@gmail.com>)
Responses Re: pgwin32_open returning EINVAL  ("Trevor Talbot" <quension@gmail.com>)
List pgsql-hackers
On Thu, Dec 20, 2007 at 04:39:55AM -0800, Trevor Talbot wrote:
> On 12/20/07, Magnus Hagander <magnus@hagander.net> wrote:
> 
> > ereport(WARNING,
> >     (errmsg("could not open file \"%s\": %s violation", fileName,
> >           (GetLastError() ==
> > ERROR_SHARING_VIOLATION)?_("sharing"):_("lock")),
> >          errdetail("Continuing to retry for 30 seconds."),
> >          errhint("You may have antivirus, backup or similar software
> > interfering with the database.")));
> 
> Without looking myself, is it possible for errhint() or errdetail() to
> do something that affects GetLastError()? It's like errno, checking it
> very far away from the call site makes me nervous.

I guess, but it shouldn't matter. We're giong to loop right back up and do a
new CreateFile() after this, which will overwrite it again.

//Magnus


pgsql-hackers by date:

Previous
From: "Trevor Talbot"
Date:
Subject: Re: pgwin32_open returning EINVAL
Next
From: "Trevor Talbot"
Date:
Subject: Re: pgwin32_open returning EINVAL