Commit graph

6 commits

Author SHA1 Message Date
Mike McQuaid
6010b3a8d9
brew-postgresql-upgrade-database: re-add strips.
These were mistakenly removed in https://github.com/Homebrew/homebrew-core/pull/39895.

Fixes https://github.com/Homebrew/homebrew-core/issues/40904
2019-06-12 08:34:06 +01:00
Logan Leger
02df2994aa cmd/brew-postgresql-upgrade-database: fix initdb issues.
* Add `safe_system` to `initdb` call to catch errors

If the `initdb` step fails (which it can if the options passed are
invalid), then the script will continue having marked `initdb_run` as
`true`. This causes the script to continue to `pg_upgrade` step which
will fail, ultimately triggering the `ensure` block. Since `initdb_run`
is `true`, the script tries to remove `datadir` which we don't want
since that step failed.

The change here adds `safe_system` to ensure if the `initdb` step fails,
it correctly bails out.

* Add -X to `psql` call to ignore `.psqlrc` files

Customizations in `.psqlrc` files can make the output of `psql`
unpredictable, which can break parsing of the command's output. Using -X
causes `psql` to ignore any such files and use the default output
behavior, which can be parsed with consistency.
2019-06-11 19:05:47 +01:00
Tetsu
0f598dec43 cmd/brew-postgresql-upgrade-database: use --lc-collate and --lc-ctype (#36497) 2019-02-15 15:37:31 +00:00
Mike McQuaid
49dcf82cb4
brew-postgresql-upgrade-database: don't use old kegs. (#35169)
Instead always rely on the versioned formulae that are properly supported.

Reference #34879.
2018-12-16 20:01:17 +00:00
Hugo Hache
2507b57357
brew-postgresql-upgrade-database: abort upgrade if pg_upgrade fails
* Use dedicated safe_system to raise exception

Closes #31175.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2018-08-21 06:04:59 +01:00
Mike McQuaid
d474d480f3 brew-postgresql-upgrade-database: fix name. 2018-01-09 09:06:37 +00:00
Renamed from cmd/brew-postgresql-data-upgrade.rb (Browse further)