Skip to content
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

Multiple installations of the same database version #32

Closed
Ovid opened this issue Oct 1, 2019 · 7 comments
Closed

Multiple installations of the same database version #32

Ovid opened this issue Oct 1, 2019 · 7 comments

Comments

@Ovid
Copy link

Ovid commented Oct 1, 2019

It would be very nice to install the same version of PostgreSQL more than once.

Workflow:

  1. pgenv build-duplicate 9.6.2 (creates a 9.6.2-v$version if it's not the first one)
  2. pgenv alias veure 9.6.2-v$version (General suggestions (can break into separate tickets) #31)
  3. bin/setup/install-sqitch
  4. sqitch deploy
  5. Run tests against the new database
  6. While tests are running, go to step one to "pre-prepare" for another Jenkins run rather than waiting for the same database

This would likely require separate data directories to be really useful.

@fluca1978
Copy link
Collaborator

This can already be done with different PGENV_ROOT variables. Does this trick not suffice?

@Ovid
Copy link
Author

Ovid commented Oct 1, 2019

I'm rather sick right now and my brain isn't working as well as it could be :)

If I use PGENV_ROOT to set a different directory but install the same database version, you're saying I do something like this?

PGENV_ROOT=~/.pgenv/versions/v2/9.6.2 pgenv build 9.6.2
PGENV_ROOT=~/.pgenv/versions/v2/9.6.2 pgenv use 9.6.2

An that clearly uses a different data directory?

@fluca1978
Copy link
Collaborator

Well, using PGENV_ROOT could be a solution to your problem:

% export PGENV_ROOT=~/tmp/v1
% pgenv build 11.5

will build ~/tmp/v1/pgsql-11.5, while

% export PGENV_ROOT=~/tmp/v2
% pgenv build 11.5

will build ~/tmp/v2/pgsql-11.5.
Of course this is not perfect, since you have to remember the PGENV_ROOT you need to work with, but I guess for automated jobs it does suffice.

@theory
Copy link
Owner

theory commented Nov 15, 2020

Should this issue be closed? Is PGENV_ROOT the proper solution?

@theory
Copy link
Owner

theory commented Nov 5, 2021

@Ovid did @fluca1978's suggestion solve the problem for you?

@fluca1978
Copy link
Collaborator

@Ovid did you have a chance to check if PGENV_:ROOT can fix the problem?

@Ovid
Copy link
Author

Ovid commented Jan 9, 2023

My apologies. This is years ago and I completely forgot about this. I would suggest closing the ticket. My apologies for the delay. In particular, we've largely switched to Docker and issues like this are no longer an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants