make check must be run as postgres user
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
The installation instructions in CONTRIBUTING.md doesn't say anything about needing to install citus as the user that is running the PostgreSQL server, normally the "postgres" user on e.g. Ubuntu.
It isn't as simple as to just sudo -u postgres, since then the script can't access the files owned by the system user that built the citus extension, example:
$ sudo -u postgres make check
'/usr/bin/perl' /home/joel/postgresql-extensions/citus/src/test/regress/pg_regress_multi.pl --pgxsdir="/usr/lib/postgresql/13/lib/pgxs" --bindir="/usr/lib/postgresql/13/bin" --libdir="/usr/lib/x86_64-linux-gnu" --majorversion="13" --postgres-builddir="/build/postgresql-13/build" --postgres-srcdir="/build/postgresql-13/build/.." --load-extension=citus \
-- --inputdir=/home/joel/postgresql-extensions/citus/src/test/regress --launcher="/home/joel/postgresql-extensions/citus/src/test/regress/log_test_times" --schedule=/home/joel/postgresql-extensions/citus/src/test/regress/multi_schedule
mkdir tmp_check: Permission denied at /home/joel/postgresql-extensions/citus/src/test/regress/pg_regress_multi.pl line 562.
make: *** [Makefile:132: check-multi] Error 13
To fix, I had to git clone the repo as the postgres user, recompile, install and then run the tests.
I think it would be more user-friendly if the tests could be run as a normal user.
Contributor guide
Assessment
This issue has not been assessed yet.