Re: pg_ctl vs. Windows locking - Mailing list pgsql-hackers-win32

From Andrew Dunstan
Subject Re: pg_ctl vs. Windows locking
Date
Msg-id 40CDBC0A.5000207@dunslane.net
Whole thread Raw
In response to Re: pg_ctl vs. Windows locking  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: pg_ctl vs. Windows locking  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers-win32
Bruce Momjian wrote:

>Good report.  Would you check to see if a sleep or loop checking if the
>file is unused would help?
>
>

I'll check later - I am assuming that this is the logfile it is
complaining about.

When I was watching it in the Task Manager, it was observable that the
postmaster exited before some of the other backend processes, by up to a
second or two. I suspect a sleep would cure most of the problem, but it
seems a bit arbitrary - is there a more robust way on Windows to check
that needed files are unlocked?

cheers

andrew

>---------------------------------------------------------------------------
>
>Andrew Dunstan wrote:
>
>
>>pg_ctl seems to be working for Windows now, except that there are occasional Windows file locking issues, especially
onrestart - see below. 
>>
>>
>>
>>C:\msys\1.0\local\pgsql>bin\pg_ctl -D data -l logfile restart
>>waiting for postmaster to shut down....done
>>postmaster stopped
>>postmaster starting
>>
>>C:\msys\1.0\local\pgsql>
>>C:\msys\1.0\local\pgsql>
>>C:\msys\1.0\local\pgsql>
>>C:\msys\1.0\local\pgsql>
>>C:\msys\1.0\local\pgsql>bin\pg_ctl -D data -l logfile restart
>>waiting for postmaster to shut down....done
>>postmaster stopped
>>The process cannot access the file because it is being used by another process.
>>Unable to run the postmaster binary
>>
>>
>>


pgsql-hackers-win32 by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: Installer
Next
From: Tom Lane
Date:
Subject: Re: pg_ctl vs. Windows locking