Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDoIy-003LH2-Ez for pgsql-general@arkaria.postgresql.org; Wed, 20 Nov 2024 17:15:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tDoIx-007ngC-76 for pgsql-general@arkaria.postgresql.org; Wed, 20 Nov 2024 17:15:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDoIv-007nfx-Mg for pgsql-general@lists.postgresql.org; Wed, 20 Nov 2024 17:15:50 +0000 Received: from fout-a1-smtp.messagingengine.com ([103.168.172.144]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDoIr-002xSh-Ph for pgsql-general@lists.postgresql.org; Wed, 20 Nov 2024 17:15:48 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 850CA13806AB; Wed, 20 Nov 2024 12:15:43 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 20 Nov 2024 12:15:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1732122943; x=1732209343; bh=HC0uU5qmPRiJgbPppyYRng7334RxJxPJpXBlCTtQEp8=; b= Dyf8I17xXYOluKg7CUxzXxBVEa45NpU6FokXUzlDuZFDu/ZD4grvnjaV8Te0Lggr QeWXYmTRE4o22s2vQJ0qEaIfgQjmYiTHtheROprtX9R5UWcCKORsFTLiadTmyVzU VemiFk2UThNTmuLgxYxkeOqaMRRUCZb5Mfj1f8u06Lyt7j0Mt2DvecwS3RJ+KEPQ L1/V0+TKoo8vsszS2pEMYR4bITTl7NhrZwArKVccFxlDE5laAK6gJ1DSzFGBw3NH ZASjdV+s82dRLeh9BFuTJnVjNbugZtnM96zX0gLSq6aPiQi8qjH26U0KK6r6+8Ff SN2WRxrd2JTivXU03Zm4gQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1732122943; x=1732209343; bh=H C0uU5qmPRiJgbPppyYRng7334RxJxPJpXBlCTtQEp8=; b=fd6K5Q2qpEA8r6Ydb /4aHlxNad36jnJhHoDRLH99yUAQj+eoUOAW8G2qWb/UhuEEx8jOpspfDu82dS07C blnUFIwSKPR2CcHIbf205bvF4tYZdYu83uVkN7nCtjPwB08QEeAOoO6d8008yiN3 0+0wSY50uJUWtuz0D9cqNCYqoOj1g7gHmflEGkrvLv/pLwcpXJg2vbfdzw6CyoG/ wjXIv/PpTU+DUi+tDy1tIBxXJKNJ/aRy1wQ+MfjsdPOcMVT9IqB8VcNyh2HcSFWV 5rL5FWztd6EzfnigbbBNGRkCeaHoeLOfangL+EZz+GB2i2dTst/gYJRieK0Nnikb 0keMg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfeeggdeljecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtvdejnecu hfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrg hklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepiedvhfeiheehgeeuieeljeei tedtjeehudegfeelkedvleekhedtgfeiffefkedunecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgr vhgvrhdrtghomhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepthhstghhfigvihhklhgvsegsfhhsrdguvgdprhgtphhtthhopehpghhsqhhl qdhgvghnvghrrghlsehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 20 Nov 2024 12:15:42 -0500 (EST) Message-ID: Date: Wed, 20 Nov 2024 09:15:42 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Postgres service not starting on windows after install if not installed into standard locations To: Thomas Schweikle , "pgsql-general@lists.postgresql.org" References: <054ffbb250c1ea1713b0e9e91d038a4a9071fc94.camel@cybertec.at> <44c72245-7cb5-47bd-a6b5-e15d0b2a487e@bfs.de> Content-Language: en-US From: Adrian Klaver In-Reply-To: <44c72245-7cb5-47bd-a6b5-e15d0b2a487e@bfs.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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: >> How exactly is the Windows service defined? >> Perhaps you need to use an absolute path for the executable. > > Servicename: postgresql-x64-16 > Name: postgresql-x64-16-PostgreSQL Server 16 > Comment: Provides relational database storage > Path: "C:\PRGS\pgSQL\16\bin\pg_ctl.exe" > runservice -N "postgresql-x64-16" > -D "C:\DB\pgSQL\16\data" -w > Type: Automatic > Account: Networkservice > Password: set > Dependencies:RPC, DCOM-Service, RPC-Endpoint Did you change settings during the install? Here on my Windows machine I get: C:\Program Files\PostgreSQL\bin > > Errors found within system logs: > pg_ctl: could not find program 'postgres.exe' > > Seems, since "C:\PRGS\pgSQL\16\bin" is in system path, it does not > search there at all: > > # dir "C:\PRGS\pgSQL\16\bin" > [...] > Mi, 13.Nov.2024 13:24 123.392 pg_ctl.exe > [...] > Mi, 13.Nov.2024 13:24 8.659.968 postgres.exe > > Any way to tell a service in Windows to use a path? > Any registry key to assign a path to? > > # sc qc "postgresql-x64-16" > [SC] QueryServiceConfig ERFOLG > > SERVICE_NAME: postgresql-x64-16 > TYPE : 10 WIN32_OWN_PROCESS > START_TYPE : 2 AUTO_START > ERROR_CONTROL : 1 NORMAL > BINARY_PATH_NAME : "C:\PRGS\pgSQL\16\bin\pg_ctl.exe" > runservice -N "postgresql-x64-16" -D "C:\DB\pgSQL\16\data" -w > LOAD_ORDER_GROUP : > TAG : 0 > DISPLAY_NAME : postgresql-x64-16 - PostgreSQL Server 16 > DEPENDENCIES : RPCSS > SERVICE_START_NAME : NT AUTHORITY\NetworkService > > -- Adrian Klaver adrian.klaver@aklaver.com