I have downloaded the plv8 installation package from xTuple using this link.
I have run the installation batch file in that package.
I've checked the relevant files are now in bin, lib and share/extension.
I have given my user superuser permissions with:
ALTER USER administrator WITH superuser
When I try to create the extension, I receive a Permission Denied error:
CREATE EXTENSION IF NOT EXISTS plv8
> ERROR: could not open extension control file "C:/Program Files/PostgreSQL/12/share/extension/plv8.control": Permission denied
I can't work out what's wrong.
First of all, thank you for providing the link to the packaged extension.
I installed the PLV8 extension using the .bat file, and then I had to restart the PostgreSQL service on my Windows machine.
After that, running the create extension plv8; command in pgAdmin worked without a problem.
I verified that the extension is installed by trying to execute the same command again and getting an "ERROR: extension "plv8" already exists" message.
I think you have have forgotten to restart the PostgreSQL service after installation of the extension package.
Related
Working on macOS / catalina
Did a binary install with postgis, but having some trouble. Downloaded both postgresSQL and postgis with homebrew, seemingly successful
Ran psql -U postgres and then ran CREATE EXTENSION postgis but got the error:
[ERROR: could not open extension control file "/Library/PostgreSQL/13/share/postgresql/extension/postgis.control": No such file or directory
thought it was because my install was in my homebrew cellar directory, so I just copied it over to the above directory the create extension command went to, but when I re-login and rerun the create extension command, it gives me back the same error even though the file now exists in "/Library/PostgreSQL/13/share/postgresql/extension" - can't understand why this is happening / how the system is thinking when it gives this error, is this because it can't access the directory due to permissions?
I installed curl on my machine today by running brew install curl, and it installed curl but also ended up updating a bunch of other packages, including my postgres (I'm using postgresql12)
I end up running any insert statement (which will insert a primary key automatically), and I get this error:
[58P01] ERROR: could not access file "$libdir/uuid-ossp": No such file or directory
When I run select * from pg_extension, I see that I have uuid-ossp installed as an extension, so I do not know why it is not able to find this.
I am using MacOS
This isn't an answer to my question because I went to a last resort, but I ended up just reinstalling postgres: https://bitadj.medium.com/completely-uninstall-and-reinstall-psql-on-osx-551390904b86
I would still like to hear other answers on the matter, as I would not recommend my answer unless absolutely necessary
I am currently trying to build a historized database using postgres 12.4.0 and the periods extension. Everything is working fine so far on my Win10Pro X64 machine.
I setup another machine with Win10Pro X64 the same as mine - as far as I can tell:
install postgres
stop postgres service
copy contents of periods release zip https://github.com/xocolatl/periods/releases/download/v1.2/periods-v1.2-pgREL_12_STABLE-windows-x64.zip to postgres/12 dir
start postgres service
now, when I run CREATE EXTENSION IF NOT EXISTS periods CASCADE;, I get the following error only on the other machine:
konnte Bibliothek
»C:/Program Files/PostgreSQL/12/lib/periods.dll« nicht laden: unknown error 126
(in english: could not load library periods.dll)
Everything works fine on my machine
The dll file is there
The required extension btree_gist is there and loadable
How can I fix this?
Found the issue using dependency walker. The periods.dll in that release needs VS2015 debug dlls. My computer had them due to me having the sdk installed.
I needed to copy
vcruntime140d.dll
ucrtbased.dll
to c:\Windows\System32
I'm upgrading my database from 10.4 to 11.3 but when performing the check when using pg_upgrade, I am getting the following errors:
could not load library "$libdir/uuid-ossp": ERROR: could not access file "$libdir/uuid-ossp": No such file or directory
could not load library "$libdir/postgres_fdw": ERROR: could not access file "$libdir/postgres_fdw": No such file or directory
I am using CentOS 7 and to see if I need to create the extension first, I tried the following and got the following error:
postgres=# CREATE EXTENSION postgres_fdw;
ERROR: could not open extension control file "/pgapp/postgresql/11.3/share/extension/postgres_fdw.control": No such file or directory
So it doesn't seem like the FDW binaries were loaded when I did the yum install documented on the postgres page. Is there a way to install these files separately or is there another way to get this to work so that I can finish my upgrade?
Having difficulties implementing extension Citext in Postgres 10.1 on aws ec2 instance.
1- Tried "Create extension citext;"
--ERROR: could not open extension control file "/usr/local/pgsql/share/extension/citext.control": No such file or directory
SQL state: 58P01
2- Tried to install, postgresql-contrib.
--Not found
3- Installed postgresql96-contrib (older version), then tried to copy extension files (using ec2-user root account) from "usr/share/psql96/extenson" to "/usr/local/pgsql/share/extension".
-- Access denied
Linux newbie, any help would be appreciated.
Assuming you are using amazon ec2 instance running amazon linux ami, try installing the postgresql-contrib package on this instance,
sudo yum install postgresql-contrib
Now below command from psql prompt should work,
CREATE EXTENSION citext;