Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oMdbJ-0007tp-DR for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Aug 2022 22:57:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oMdbH-0001Or-Ex for pgsql-bugs@arkaria.postgresql.org; Fri, 12 Aug 2022 22:57:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oMdbH-0001Oi-6G for pgsql-bugs@lists.postgresql.org; Fri, 12 Aug 2022 22:57:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oMdbA-00081I-Ma for pgsql-bugs@lists.postgresql.org; Fri, 12 Aug 2022 22:57:54 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 27CMvT9Q204590; Fri, 12 Aug 2022 18:57:29 -0400 From: Tom Lane To: yakov.garbuz@asmr.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17585: Wrong path to the extension control file In-reply-to: <17585-f1cb9854d087c002@postgresql.org> References: <17585-f1cb9854d087c002@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 12 Aug 2022 20:23:21 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <204588.1660345049.1@sss.pgh.pa.us> Date: Fri, 12 Aug 2022 18:57:29 -0400 Message-ID: <204589.1660345049@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > When I login to a server > sudo -u postgres -h "nnn.nnn.nnn.nnn" -p nnnn -d postgres psql > and execute command > CREATE EXTENSION IF NOT EXISTS postgres_fdw; > it runs OK, extension created and file postgres_fdw.control found in the > folder > "/usr/local/Cellar/postgresql@12/12.11/share/postgresql@12/extension/" > But when I login to the same server but to the different database and as a > different user > sudo -u myuser -h "nnn.nnn.nnn.nnn" -p nnnn -d mydb psql > and try execute the same command > CREATE EXTENSION IF NOT EXISTS postgres_fdw; > I'm getting ERROR: could not open extension control file > "/usr/pgsql-12/share/extension/postgres_fdw.control": No such file or > directory I find it *extremely* implausible that those are actually the same server, because the path to the extension directory isn't configurable; it's pretty much wired in at build time. So I think you've managed to put two separate PG installations on that machine. One of them looks to be following HomeBrew directory conventions, while /usr/pgsql-12/ is sort of like what Debian does and not at all like any macOS packager I know. Are you really sure you're connecting to the same machine in both examples? "SELECT version();" might be informative, also "SHOW config_file;". regards, tom lane