pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
BUG #17585: Wrong path to the extension control file 4+ messages / 3 participants [nested] [flat]
* BUG #17585: Wrong path to the extension control file @ 2022-08-12 20:23 PG Bug reporting form <noreply@postgresql.org> 0 siblings, 1 reply; 4+ messages in thread From: PG Bug reporting form @ 2022-08-12 20:23 UTC (permalink / raw) To: pgsql-bugs@lists.postgresql.org; +Cc: yakov.garbuz@asmr.com The following bug has been logged on the website: Bug reference: 17585 Logged by: Yakov Garbuz Email address: yakov.garbuz@asmr.com PostgreSQL version: 12.11 Operating system: Mac OS Description: 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 For some reason application is looking for file postgres_fdw.control in the non-existing directory /usr/pgsql-12/ Please advise ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: BUG #17585: Wrong path to the extension control file @ 2022-08-12 22:57 Tom Lane <tgl@sss.pgh.pa.us> parent: PG Bug reporting form <noreply@postgresql.org> 0 siblings, 1 reply; 4+ messages in thread From: Tom Lane @ 2022-08-12 22:57 UTC (permalink / raw) To: yakov.garbuz@asmr.com; +Cc: pgsql-bugs@lists.postgresql.org PG Bug reporting form <noreply@postgresql.org> 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 ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [External] Re: BUG #17585: Wrong path to the extension control file @ 2022-08-22 13:16 Garbuz, Yakov [ASM Research] <Yakov.Garbuz@asmr.com> parent: Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 4+ messages in thread From: Garbuz, Yakov [ASM Research] @ 2022-08-22 13:16 UTC (permalink / raw) To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org> SELECT version(); "PostgreSQL 12.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), 64-bit" SHOW config_file; "/var/lib/postgresql/data/postgresql.conf" cat: /var/lib/postgresql/data/postgresql.conf: No such file or directory There is no postgresql directory in /var/lib/ Please advice From: Tom Lane <tgl@sss.pgh.pa.us> Date: Monday, August 22, 2022 at 8:10 AM To: Garbuz, Yakov [ASM Research] <Yakov.Garbuz@asmr.com> Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org> Subject: [External] Re: BUG #17585: Wrong path to the extension control file PG Bug reporting form <noreply@postgresql.org> 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 The information contained in this message may be privileged and/or confidential and protected from disclosure. If the reader of this message is not the intended recipient or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and deleting the material from any computer. ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: [External] Re: BUG #17585: Wrong path to the extension control file @ 2022-08-22 13:21 Tom Lane <tgl@sss.pgh.pa.us> parent: Garbuz, Yakov [ASM Research] <Yakov.Garbuz@asmr.com> 0 siblings, 0 replies; 4+ messages in thread From: Tom Lane @ 2022-08-22 13:21 UTC (permalink / raw) To: Garbuz, Yakov [ASM Research] <Yakov.Garbuz@asmr.com>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org> "Garbuz, Yakov [ASM Research]" <Yakov.Garbuz@asmr.com> writes: > SELECT version(); > "PostgreSQL 12.6 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5), 64-bit" > SHOW config_file; > "/var/lib/postgresql/data/postgresql.conf" > cat: /var/lib/postgresql/data/postgresql.conf: No such file or directory > There is no postgresql directory in /var/lib/ The best explanation I can see for that is that the server is on some other machine than where you are running psql/cat. I guess it's at least theoretically possible that the server was originally started in /var/lib/postgresql/data and somebody moved that directory since then. In any case, none of this looks like a Postgres bug; it looks like sloppy sysadmin work. You're going to have to puzzle out what's been done in that installation by yourself, because the rest of us don't have the facts available. regards, tom lane ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2022-08-22 13:21 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-08-12 20:23 BUG #17585: Wrong path to the extension control file PG Bug reporting form <noreply@postgresql.org> 2022-08-12 22:57 ` Tom Lane <tgl@sss.pgh.pa.us> 2022-08-22 13:16 ` Garbuz, Yakov [ASM Research] <Yakov.Garbuz@asmr.com> 2022-08-22 13:21 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox