Re: pg_ctl vs. Windows locking

Andrew Dunstan <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32
Message-ID <[email protected]>
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 on restart - 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
>>
>>    
>>


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [email protected])
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.