Arbitrary Config Test suite reads local psqlrc
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
When I try to run some arbitrary config tests (while working on #5885), I see several errors indicating that we attempt to read `~/.psqlrc` configs.
I have `ALTER ROLE hanefi SET ..` statements in `~/.psqlrc`
Output for `make check-arbitrary-base`
```
make check-arbitrary-base CONFIGS=CitusSingleNodeClusterConfig
/home/hanefi/code/citus/src/test/regress/citus_tests/arbitrary_configs/citus_arbitrary_configs.py --bindir=/home/hanefi/.pgenv/pgsql-14.0/bin --pgxsdir=/home/hanefi/.pgenv/pgsql-14.0/lib/pgxs --parallel= --configs=CitusSingleNodeClusterConfig --seed= --base
Running test for: CitusSingleNodeClusterConfig
The files belonging to this database system will be owned by user "hanefi".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".
Data page checksums are disabled.
creating directory /home/hanefi/code/citus/src/test/regress/tmp_citus_test/dataCitusSingleNodeClusterConfig/coordinator ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Europe/Istanbul
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
Sync to disk skipped.
The data directory might become corrupt if the operating system crashes.
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/home/hanefi/.pgenv/pgsql-14.0/bin/pg_ctl -D /home/hanefi/code/citus/src/test/regress/tmp_citus_test/dataCitusSingleNodeClusterConfig/coordinator -l logfile start
waiting for server to start.... done
server started
psql:/home/hanefi/.psqlrc:3: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:4: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:5: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:3: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:4: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:5: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:3: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:4: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:5: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:3: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:4: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:5: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:3: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:4: ERROR: role "hanefi" does not exist
psql:/home/hanefi/.psqlrc:5: ERROR: role "hanefi" does not exist
(using postmaster on Unix socket, port 10204)
============== running regression test queries ==============
test intermediate_result_pruning_create ... ok 392 ms
....
```
An excerpt from my `~/.psqlrc` that errors when user `hanefi` is missing
```sql
ALTER ROLE hanefi SET citus.log_remote_commands TO 1;
ALTER ROLE hanefi SET citus.shard_count TO 4;
ALTER ROLE hanefi SET client_min_messages TO DEBUG;
```
Contributor guide
Assessment
This issue has not been assessed yet.