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 1shKH4-00GORg-QZ for pgsql-general@arkaria.postgresql.org; Fri, 23 Aug 2024 02:43:39 +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 1shKH2-008RQp-KM for pgsql-general@arkaria.postgresql.org; Fri, 23 Aug 2024 02:43:37 +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 1shKH1-008RQg-CR for pgsql-general@lists.postgresql.org; Fri, 23 Aug 2024 02:43:36 +0000 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1shKGw-001308-Rk for pgsql-general@lists.postgresql.org; Fri, 23 Aug 2024 02:43:35 +0000 Received: from phl-compute-05.internal (phl-compute-05.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id A2E40115123D; Thu, 22 Aug 2024 22:43:29 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Thu, 22 Aug 2024 22:43:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc: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=1724381009; x=1724467409; bh=Vmte6uhL6iAMNSb9XVtPtV+WkS1ZpJrnCKeVuI4Pqd0=; b= Q/vLFb2eDvhT3EZLXrs8WT444EkdNhtJucS9Ta9VVl48+5DV2Iezce4ObOvp7ZfH RpTR9gkqnpzJZGz2RnBVxyGVqnTeS2xTC4kL93zHJM/kcymyhc+ldRwuP+deqVzx KmjwIGD93wr7gxqVzb3qfERmPQWTZC31vt4H3XD8Qrpbv/wIcaGqRTMwDqrjOK/M xi1t8xzZNA/0zYA52h/Gon0fIqc4K2WqC3fU4DsNwKE2m2+rQMw9q8z//Crx1GZ+ ChsIKKPVp8Sj3zKC5amXfX90zgHYua4p9FZ4cl3Zv19mpaD40zSMK40nFFwakbyB qy/FVFolCeeEVaRD8hHWxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1724381009; x= 1724467409; bh=Vmte6uhL6iAMNSb9XVtPtV+WkS1ZpJrnCKeVuI4Pqd0=; b=t /CjffSdvRvEhIYXe5UA28TBxB150o71P2SPPR8874YvCkq6EQZ0BvyFvpdDPlYxK zF1VY3U+nodXQkSxfE18JMLUTHWECqWXnzfwWBeAxLTENIJRa32V7CQj5CrkoAnh ify6Lpy7S0yoSf+E5+9C7Q5NJWNvWFtVITpVFSAOHxCUtzoYlLMkIGTEd3jCeKw+ +s/mCYTeuhXGJEty/eTStwtTM8GcVUoxXLgnV+YewRMGLm7RJ+HWtQWF7ZSTS/Xj 1OOcHaGL7LJaJ1O5RuiIUec8ldbtzruqHotMKFGgHTPuaQolA77XPdl/6rhuts41 IJ4uAF6s7j0BzdqBWo8oQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddruddvuddgiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdej necuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrh esrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhephfeviefhveelffeftdeh udekveefhfeftdegieefveetfffgfeehtdfftedutedtnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghk lhgrvhgvrhdrtghomhdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhushdprhgtphhtthhopegrrhgs ohhlohhnvgeshhhothhmrghilhdrtggrpdhrtghpthhtohepphhgshhqlhdqghgvnhgvrh grlheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 22 Aug 2024 22:43:28 -0400 (EDT) Message-ID: Date: Thu, 22 Aug 2024 19:43:27 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Where is my app installed? To: Tom Lane Cc: Arbol One , pgsql-general@lists.postgresql.org References: <2115389.1724379712@sss.pgh.pa.us> Content-Language: en-US From: Adrian Klaver In-Reply-To: <2115389.1724379712@sss.pgh.pa.us> 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 8/22/24 19:21, Tom Lane wrote: > Adrian Klaver writes: >> On 8/22/24 17:36, Arbol One wrote: >>> After installing PostgreSQL on my Debian-12 machine, I typed 'postgres >>> --version' and got this msg: >>> *bash: postgres: command not found* >>> 'psql --version', however, does work and gives me this message : >>> *psql (PostgreSQL) 16.3 (Debian 16.3-1.pgdg120+1)* >>> Obviously postgres is not in the path, but I don't know where the >>> 'apt-get' installed it or why it did not add it to the path. > >> As to where the postgres command is: >> ls -al /usr/lib/postgresql/16/bin/ > > Theory 1: postgres is packaged in a "postgresql-server" package > and the OP only installed the base (client-side) package. > > Theory 2: postgres is installed into some directory not in the OP's > PATH, such as /usr/sbin. Since it's primarily used as a daemon, > this'd be a reasonable thing for a packager to do. Yes in: ls -al /usr/lib/postgresql/16/bin/ > > I'd bet a nickel on #1, though, because I've not seen too many > packagers put postgres somewhere other than where they put psql. > "Separate server package" is extremely common though. Correct. The missing part is that in Debian/Ubuntu packaging when you use psql you are actually doing: ls -al /usr/bin/psql lrwxrwxrwx 1 root root 37 Aug 8 07:37 /usr/bin/psql -> ../share/postgresql-common/pg_wrapper The Debian packaging routes most things through pg_wrapper/postgresql-common a Perl script that does the magic of finding the correct binaries for each Postgres version. > > regards, tom lane -- Adrian Klaver adrian.klaver@aklaver.com