-
Notifications
You must be signed in to change notification settings - Fork 28
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
General suggestions (can break into separate tickets) #31
Comments
Thanks, these are interesting suggestions. I'll take a look at every point within this month. |
Could we have an option to allow different Debian has clusters. Not sure about other operating systems. |
@Ovid do you mind have a look at two pull request that should do what you asked for? |
Could be an implementation to avoid problems reported in issue theory#31. The problem is that often there is a system-wide installed PostgreSQL and/or client interfaces (`psql`). When using `psql` the user gets the system wide that could be incompatible with the installed PostgreSQL version from pgenv. Using the `psql` command it is possible to run the version installed along-side the PostgreSQL version `use`d by pgenv.
@Ovid I've also implemented a very straightforward |
…tgreSQL. See issue #31 and discussion about PR #39. The idea is that PGENV will check every time a `check`, `use`, `start` command is issued if the PATH contains $PGENV/pgsql/bin entry and if that entry is ahead of other entries. In this way, the user will end up using always the selected PostgreSQL binaries. A new parameter PGENV_WARNINGS has been introduced in the configuration settings so that it is possible to avoid the warnings.
…ion. When a `build` command is issued, the system prints a message to warn the user and waits 5 seconds. Since there is a new configuration variable, PGENV_WARNINGS, it is possible to exclude this message (see #31) due to configuration. However, for backward compatibility, the variable is set to on if no configuration is found.
This isn't to create an issue per se, but to discuss a few things I saw yesterday that are still fresh on my mind while using
pgenv
for the first time. If any seem relevant, happy to create separate issues for them.First, let me just say this is an awesome tool. Thank you for it :) I don't think an issue is required for this.
New subcommand:
alias
We like to have a lot of our deployment workflow for the Tau Station MMORPG involve aliases. Thus, if we want to
sqitch deploy
some major databases changes, we'd love to have analias
:And with that, we then safely proceed with our regular deployment and restarting our servers automatically point to the correct database. If something goes wrong ...
And then we can roll back our changes and restart the servers. Players may have lost some game action, but hopefully not too much.
Of course, the
remove
,current
, andversions
commands may need to be aware of the aliases.New subcommand:
rebuild
More or less equivalent to:
However, the
--keep-config
option would make it trivial for someone to edit the$pg_version
config and, say, add--with-uuid=ossp
for older PostgreSQL's and not worry about the 5 second window which has bitten me several times when reinstalling withpgenv
:Alternatively, have a workflow change whereby
pgenv
simply halts on-z "$PGENV_CONFIGURATION_FILE"
and prompts if you wish to continue (with an optional flag topgenv build
to skip this check when people want deployment automated).Warn if current data directory?
Not sure how this is handled by PostgreSQL, but this bit me hard yesterday (particularly as I was working with an old, slow computer).
I needed to upgrade PostgreSQL from 9.3.5 to 9.6.2.
pgenv
was a breeze my first time around, and then I got this:I actually didn't notice this until a long
sqitch deploy
failed midway due to an incompatible data type. This was because I had an older pg installed. So I didbrew uninstall postgresql
and it removed it, but the problem remained because I had an old data directory lying around (I don't know if homebrew doesn't remove that or if it was from a previous build, but the versions were the same).I finally manually deleted the data directory and everything built nicely. However, if there's some way to detect if PostgresSQL is going to use an existing data directory, it would be nice to know that.
Update: fixing many typos in the above because I was very sick when I wrote this. Sorry if it was confusing at times.
The text was updated successfully, but these errors were encountered: