public inbox for [email protected]  
help / color / mirror / Atom feed
From: Adrian Klaver <[email protected]>
To: Thomas Schweikle <[email protected]>
To: [email protected] <[email protected]>
Subject: Re: Postgres service not starting on windows after install if not installed into standard locations
Date: Thu, 21 Nov 2024 08:45:58 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

On 11/21/24 06:10, Thomas Schweikle wrote:
> Am Mi., 20.Nov..2024 um 18:15:42 schrieb Adrian Klaver:
>> On 11/20/24 05:26, Thomas Schweikle wrote:
>>> Am Mo., 18.Nov..2024 um 19:43:36 schrieb Laurenz Albe:
>>>> On Mon, 2024-11-18 at 17:22 +0000, Thomas Schweikle wrote:
>>>>> Had installed PostgreSQL 16.5 on Windows 10:

>> Did you change settings during the install?
> 
> I called the installer with:
> 
> .\postgresql-16.5-1-windows-x64.exe
> 
> Then changed install path to: "C:\PRGS\pgSQL"
> And database path to: "C:\DB\pgSQL"
> 
> After a while postgres got installed into "C:\PRGS\pgSQL\16" and the
> database path was created: "C:\DB\pgSQL\16\data", but the database was
> not created. Calling pg_initdb did the job and created the database
> within the given folder.
> 
> Calling "pg_ctl start" gave a message, that "pg_ctl.exe" could not find
> "postgres.exe" -- I prepended "C:\PRGS\pgSQL\16\bin" to %PATH%. Next
> thing was that pg_ctl could not find the just, with pg_initdb, created
> database. So I've set up PGDATA to point to "C:\DB\pgSQL\16\data". Both
> within the global system environment of windows.
> 
> Tried again to start postgres via "pg_ctl start". This time postgres got
> up and running instantly.
> 
> Then stopped postgres again: "pg_ctl.exe stop". And tried it using "net
> start postgresql-x64-16". This failed. "pg_ctl.exe" called could not
> find "postgres.exe".
> 
> Looking at the logs "pg_ctl.exe" stated it could not find "postgres.exe"
> again. Since %PGDATA% and %PATH% where set within system environment
> these are to be global and shall be active for services too.
> 
> Looking closer on "pg_ctl.exe" I found it using a build in path of
> "C:\Program files\PostgreSQL\16\bin\postgres.exe", regardless of any
> environment variables set if started without any of stdout, stdin,
> stderr, what is the case if it is started as a service.
> 


Looks like your choices are:

1) Keep the default paths during the install.

2) Raise an issue here:

https://github.com/EnterpriseDB/edb-installers/issues




-- 
Adrian Klaver
[email protected]







view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Postgres service not starting on windows after install if not installed into standard locations
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox