Re: Start service

From: Brad White <b55white(at)gmail(dot)com>
To:
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Start service
Date: 2023-09-22 19:38:03
Message-ID: CAA_1=90Sasai=KJ+8Y9f3mdNMx2vzPcw-FHhrWjdLw2coH3zbw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I created the pid file by hand and I get
C:\Users\administrator>"C:\Program
Files\PostgreSQL\15\bin\pg_ctl.exe" start
-N "postgresql-x64-15" -D "C:\Program Files\PostgreSQL\15\data" -w -U
TMA\pgUse
r -P ***********
pg_ctl: another server might be running; trying to start server
anyway
waiting for server to start..............2023-09-22 14:31:17.752 CDT
[4276] FATA
L: could not remove old lock file "postmaster.pid": Permission denied
2023-09-22 14:31:17.752 CDT [4276] HINT: The file seems
accidentally left over,
but it could not be removed. Please remove the file by hand and try again.
stopped waiting
pg_ctl: could not start server
Examine the log output.

Remove the file and we are back where we started.
But a) we are looking at the right dir, and b) it looks like it might
really be a permissions issue somehow.

On Fri, Sep 22, 2023 at 1:56 PM Brad White <b55white(at)gmail(dot)com> wrote:

> Good guess, but no. I should have mentioned that I checked that.
>
> There is, though, a postmaster.opts file that wasn't there earlier. It
> contains
> C:/Program Files/PostgreSQL/15/bin/postgres.exe "-D" "C:\Program
> Files\PostgreSQL\15\data"
> Note the lack of quotes around the exe path.
>
> On Fri, Sep 22, 2023 at 1:48 PM Nick Ivanov <nick(dot)ivanov(at)enterprisedb(dot)com>
> wrote:
>
>> I'd check if there is already "postmaster.pid" in C:\Program
>> Files\PostgreSQL\15\data, left over from a previous abend.
>>
>> On Fri, Sep 22, 2023 at 2:40 PM Brad White <b55white(at)gmail(dot)com> wrote:
>>
>>> I'm trying to start a v15 service on a Windows 2012 R2 server where it
>>> hasn't been used for a while.
>>> The service is set to run as pgUser.
>>> ...
>>> If I sub 'start' for 'runservice' and try to start it from CLI, I get
>>> C:\Users\administrator>"C:\Program
>>> Files\PostgreSQL\15\bin\pg_ctl.exe" start
>>> -N "postgresql-x64-15" -D "C:\Program Files\PostgreSQL\15\data" -w
>>> waiting for server to start....2023-09-22 12:48:05.438 CDT [4796]
>>> FATAL: could
>>> not create lock file "postmaster.pid": Permission denied
>>>
>>
>> --
>> Nick Ivanov
>> Solution Architect
>> www.enterprisedb.com
>>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message postgresql439848 2023-09-22 19:42:48 Re: Start service
Previous Message postgresql439848 2023-09-22 19:05:04 Re: debugger from superuser only.... why?