-
-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable PGUSER env when checking for existing database #380
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Could you help me understand how to replicate the failure? I tried setting my ana@autonoma:~/git/zombodb/pgx$ export PGUSER=booper
ana@autonoma:~/git/zombodb/pgx$ cargo pgx init
Discovered Postgres v14.1, v13.5, v12.9, v11.14, v10.19
Downloading Postgres v12.9 from https://ftp.postgresql.org/pub/source/v12.9/postgresql-12.9.tar.bz2
Downloading Postgres v13.5 from https://ftp.postgresql.org/pub/source/v13.5/postgresql-13.5.tar.bz2
Downloading Postgres v14.1 from https://ftp.postgresql.org/pub/source/v14.1/postgresql-14.1.tar.bz2
Downloading Postgres v11.14 from https://ftp.postgresql.org/pub/source/v11.14/postgresql-11.14.tar.bz2
Downloading Postgres v10.19 from https://ftp.postgresql.org/pub/source/v10.19/postgresql-10.19.tar.bz2
Removing /home/ana/.pgx/12.9
Removing /home/ana/.pgx/10.19
Untarring Postgres v12.9 to /home/ana/.pgx/12.9
Untarring Postgres v10.19 to /home/ana/.pgx/10.19
Removing /home/ana/.pgx/13.5
Untarring Postgres v13.5 to /home/ana/.pgx/13.5
Removing /home/ana/.pgx/14.1
Untarring Postgres v14.1 to /home/ana/.pgx/14.1
Configuring Postgres v10.19
Configuring Postgres v12.9
Configuring Postgres v13.5
Configuring Postgres v14.1
Removing /home/ana/.pgx/11.14
Untarring Postgres v11.14 to /home/ana/.pgx/11.14
Compiling Postgres v10.19
Compiling Postgres v12.9
Compiling Postgres v13.5
Configuring Postgres v11.14
Compiling Postgres v14.1
Compiling Postgres v11.14
Installing Postgres v10.19 to /home/ana/.pgx/10.19/pgx-install
Installing Postgres v12.9 to /home/ana/.pgx/12.9/pgx-install
Installing Postgres v13.5 to /home/ana/.pgx/13.5/pgx-install
Installing Postgres v14.1 to /home/ana/.pgx/14.1/pgx-install
Installing Postgres v11.14 to /home/ana/.pgx/11.14/pgx-install
Validating /home/ana/.pgx/10.19/pgx-install/bin/pg_config
Validating /home/ana/.pgx/11.14/pgx-install/bin/pg_config
Validating /home/ana/.pgx/12.9/pgx-install/bin/pg_config
Validating /home/ana/.pgx/13.5/pgx-install/bin/pg_config
Validating /home/ana/.pgx/14.1/pgx-install/bin/pg_config
ana@autonoma:~/git/zombodb/pgx$ cargo pgx start pg14
Starting Postgres v14 on port 28814
ana@autonoma:~/git/zombodb/pgx$ cargo pgx init
Discovered Postgres v14.1, v13.5, v12.9, v11.14, v10.19
Downloading Postgres v10.19 from https://ftp.postgresql.org/pub/source/v10.19/postgresql-10.19.tar.bz2
Downloading Postgres v11.14 from https://ftp.postgresql.org/pub/source/v11.14/postgresql-11.14.tar.bz2
Downloading Postgres v14.1 from https://ftp.postgresql.org/pub/source/v14.1/postgresql-14.1.tar.bz2
Downloading Postgres v12.9 from https://ftp.postgresql.org/pub/source/v12.9/postgresql-12.9.tar.bz2
Downloading Postgres v13.5 from https://ftp.postgresql.org/pub/source/v13.5/postgresql-13.5.tar.bz2
Removing /home/ana/.pgx/12.9
Untarring Postgres v12.9 to /home/ana/.pgx/12.9
Removing /home/ana/.pgx/14.1
Untarring Postgres v14.1 to /home/ana/.pgx/14.1
Removing /home/ana/.pgx/11.14
Untarring Postgres v11.14 to /home/ana/.pgx/11.14
Removing /home/ana/.pgx/13.5
Untarring Postgres v13.5 to /home/ana/.pgx/13.5
Configuring Postgres v12.9
Configuring Postgres v14.1
Configuring Postgres v11.14
Configuring Postgres v13.5
Removing /home/ana/.pgx/10.19
Untarring Postgres v10.19 to /home/ana/.pgx/10.19
Compiling Postgres v12.9
Compiling Postgres v11.14
Compiling Postgres v14.1
Compiling Postgres v13.5
Configuring Postgres v10.19
Compiling Postgres v10.19
Installing Postgres v12.9 to /home/ana/.pgx/12.9/pgx-install
Installing Postgres v11.14 to /home/ana/.pgx/11.14/pgx-install
Installing Postgres v13.5 to /home/ana/.pgx/13.5/pgx-install
Installing Postgres v14.1 to /home/ana/.pgx/14.1/pgx-install
Installing Postgres v10.19 to /home/ana/.pgx/10.19/pgx-install
Validating /home/ana/.pgx/10.19/pgx-install/bin/pg_config
Validating /home/ana/.pgx/11.14/pgx-install/bin/pg_config
Validating /home/ana/.pgx/12.9/pgx-install/bin/pg_config
Validating /home/ana/.pgx/13.5/pgx-install/bin/pg_config
Validating /home/ana/.pgx/14.1/pgx-install/bin/pg_config |
@eeeebbbbrrrr and I discussed that this change seems logical and the test failure seems unrelated. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Alike for when pgx does CREATE DATABASE, this commit forces disabling of PGUSER when checking for existing database.
This failed on my test setup, since I had setup PGUSER (for other projects) but that caused
cargo pgx init
to fail.There is no need to disable PGHOST / PGPASSWORD / PGPORT since that's being set at this point anyway (so they would override the env settings)