Closed nidhin077 closed 1 year ago
Hello @nidhin077 - which users owns the directory /usr/share/postgresql/13/extension/
? Often that is owned by postgres and it is the only user allowed to write, but could depend on how you are running postgres.
@ChuckHend We attempted the same using a Postgres user and changed the folder permissions, but the permission error persisted.
Error:
0: failed copying `/usr/share/postgresql/13/pg_later/target/release/libpg_later.so` to `/usr/lib/postgresql/13/lib/pg_later.so`
1: Permission denied (os error 13)
Location:
/var/lib/postgresql/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-pgrx-0.9.8/src/command/install.rs:227
Please take a look and let me know how to proceed the same.
Could you try getting it to run on a fresh project? cargo pgrx new
,cargo pgrx init
then cargo pgrx run pg13
? It feels like there is an OS level configuring that you'll need to figure out, but we can try to rule pg_later first.
@ChuckHend I'm sorry, I misunderstood what you were trying to say. We're attempting to add a pg_later extension to my existing Postgres-13 database. When I tried the aforementioned procedure, it created a new Postgres instance. however, I want to preserve my current Postgres13 instance and install the same on it.
Please let me know how to setup the same.
cargo pgrx run
installs the extension into a dev instance of postgres that is managed by pgrx (the framework we used to build pg_later). We need to provide pgrx with the path to the pg_config that we want to use during install so that it can find the appropriate sharedir, pkglibdir, etc.
Try this (you can change out $(which pg_config)
with the path to your pg_config
binary.
cargo pgrx install --pg-config $(which pg_config)
cargo pgrx run
installs the extension into a dev instance of postgres that is managed by pgrx (the framework we used to build pg_later). We need to provide pgrx with the path to the pg_config that we want to use during install so that it can find the appropriate sharedir, pkglibdir, etc.Try this (you can change out
$(which pg_config)
with the path to yourpg_config
binary.cargo pgrx install --pg-config $(which pg_config)
Thanks @ChuckHend, This worked.
Hi,
Initially, we attempted to install pg_later on the Ubuntu 20.04 version using the root account, but I encountered an issue at the stage of
cargo pgrx run pg13
I then attempted the same using a normal user and received a permission problem.
Would someone kindly help me to address this problem?