Getting psql: error: FATAL: role "root" does not exist
asharabu opened this issue · 1 comments
Hi,
I am getting below error while executing make install installcheck
. Please note that I am trying this on Postgres 12 docker container.
:/tmp/pgsparql# make install installcheck
/bin/mkdir -p '/usr/share/postgresql/12/extension'
/bin/mkdir -p '/usr/share/postgresql/12/extension'
/usr/bin/install -c -m 644 .//sparql.control '/usr/share/postgresql/12/extension/'
/usr/bin/install -c -m 644 .//sparql--0.3.sql .//sparql--0.3--0.4.sql sparql--0.4.sql '/usr/share/postgresql/12/extension/'
/usr/lib/postgresql/12/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --bindir='/usr/lib/postgresql/12/bin' --inputdir=test --dbname=contrib_regression init test
(using postmaster on Unix socket, default port)
============== dropping database "contrib_regression" ==============
psql: error: FATAL: role "root" does not exist
command failed: "/usr/lib/postgresql/12/bin/psql" -X -c "DROP DATABASE IF EXISTS "contrib_regression"" "postgres"
make: *** [/usr/lib/postgresql/12/lib/pgxs/src/makefiles/pgxs.mk:420: installcheck] Error 2
This is because you are trying to run tests user root, install
runs fine, problem is with installcheck
only.
You can try one of the following:
- set PGUSER, PGPASSWORD and other environment variables before running
make installcheck
- run
make installcheck
as a different user, say postgres - create database user root to run the tests as root directly