feat(dgn-console): Add perf
All checks were successful
build configuration / build_vault01 (push) Successful in 1m8s
build configuration / build_storage01 (push) Successful in 1m9s
build configuration / build_compute01 (push) Successful in 1m15s
lint / check (push) Successful in 26s
build configuration / build_web01 (push) Successful in 1m30s
build configuration / build_web02 (push) Successful in 57s
build configuration / build_rescue01 (push) Successful in 1m13s
build configuration / push_to_cache (push) Successful in 2m16s
All checks were successful
build configuration / build_vault01 (push) Successful in 1m8s
build configuration / build_storage01 (push) Successful in 1m9s
build configuration / build_compute01 (push) Successful in 1m15s
lint / check (push) Successful in 26s
build configuration / build_web01 (push) Successful in 1m30s
build configuration / build_web02 (push) Successful in 57s
build configuration / build_rescue01 (push) Successful in 1m13s
build configuration / push_to_cache (push) Successful in 2m16s
This commit is contained in:
parent
4e7b3154da
commit
17a6e085b5
1 changed files with 22 additions and 20 deletions
|
@ -76,30 +76,32 @@ in
|
|||
mtr
|
||||
tcpdump
|
||||
])
|
||||
++ lib.optional
|
||||
(config.services.postgresql.enable && config.services.postgresql.package != cfg.pg-upgrade-to)
|
||||
(
|
||||
pkgs.writeScriptBin "upgrade-pg-cluster" ''
|
||||
set -eux
|
||||
# XXX it's perhaps advisable to stop all services that depend on postgresql
|
||||
systemctl stop postgresql
|
||||
++ [ config.boot.kernelPackages.perf ]
|
||||
++
|
||||
lib.optional
|
||||
(config.services.postgresql.enable && config.services.postgresql.package != cfg.pg-upgrade-to)
|
||||
(
|
||||
pkgs.writeScriptBin "upgrade-pg-cluster" ''
|
||||
set -eux
|
||||
# XXX it's perhaps advisable to stop all services that depend on postgresql
|
||||
systemctl stop postgresql
|
||||
|
||||
export NEWDATA="/var/lib/postgresql/${cfg.pg-upgrade-to.psqlSchema}"
|
||||
export NEWDATA="/var/lib/postgresql/${cfg.pg-upgrade-to.psqlSchema}"
|
||||
|
||||
export NEWBIN="${cfg.pg-upgrade-to}/bin"
|
||||
export NEWBIN="${cfg.pg-upgrade-to}/bin"
|
||||
|
||||
export OLDDATA="${config.services.postgresql.dataDir}"
|
||||
export OLDBIN="${config.services.postgresql.package}/bin"
|
||||
export OLDDATA="${config.services.postgresql.dataDir}"
|
||||
export OLDBIN="${config.services.postgresql.package}/bin"
|
||||
|
||||
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
|
||||
cd "$NEWDATA"
|
||||
sudo -u postgres $NEWBIN/initdb -D "$NEWDATA"
|
||||
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
|
||||
cd "$NEWDATA"
|
||||
sudo -u postgres $NEWBIN/initdb -D "$NEWDATA"
|
||||
|
||||
sudo -u postgres $NEWBIN/pg_upgrade \
|
||||
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
|
||||
--old-bindir $OLDBIN --new-bindir $NEWBIN \
|
||||
"$@"
|
||||
''
|
||||
);
|
||||
sudo -u postgres $NEWBIN/pg_upgrade \
|
||||
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
|
||||
--old-bindir $OLDBIN --new-bindir $NEWBIN \
|
||||
"$@"
|
||||
''
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue