Re: pg_ctl vs. Windows locking

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers-win32 <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: pg_ctl vs. Windows locking
Date: 2004-06-14 14:54:02
Message-ID: 40CDBC0A.5000207@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 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
>>
>>
>>

In response to

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2004-06-14 15:18:38 Re: pg_ctl vs. Windows locking
Previous Message Andreas Pflug 2004-06-14 09:28:48 Re: [pgsql-hackers-win32] [PATCHES] Compiling libpq with