timescale / promscale_extension

[DEPRECATED] Tables, types and functions supporting Promscale
Other
37 stars 17 forks source link

Issue while installing promscale #617

Open AshnaSabu123 opened 1 year ago

AshnaSabu123 commented 1 year ago

Hi, While using the init command below error is getting .Please have a look into and kindly share a solution.

cargo pgx init --pg13=/usr/lib/postgresql/13/bin/pg_config Validating /usr/lib/postgresql/13/bin/pg_config Initializing data directory at /root/.pgx/data-13 Error: 0: problem running initdb: "/usr/lib/postgresql/13/bin/initdb" "-D" "/root/.pgx/data-13" initdb: error: cannot be run as root Please log in (using, e.g., "su") as the (unprivileged) user that will own the server process.

Location: cargo-pgx/src/command/init.rs:450

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

0: cargo_pgx::command::init::init_pgx with pgx_home=/root/.pgx at cargo-pgx/src/command/init.rs:118 1: cargo_pgx::command::init::execute at cargo-pgx/src/command/init.rs:68

JamesGuthrie commented 1 year ago

Hi @AshnaSabu123, Promscale, and its extension have been discontinued: https://github.com/timescale/promscale/issues/1836.

The error that you're seeing is because you can't run postgres' initdb as the root user, you must create and switch to a non-root user. This dockerfile lays out the steps required to get the extension to build: https://github.com/timescale/promscale_extension/blob/master/ha.Dockerfile.