This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Description
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