1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-06-22 01:11:02 +03:00

Merge: nixos/doc: include extensions in postgresql upgrade script (#392831)

This commit is contained in:
Maximilian Bosch 2025-03-28 10:33:00 +01:00 committed by GitHub
commit 360cd99eed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -206,15 +206,15 @@ For an upgrade, a script like this can be used to simplify the process:
export NEWBIN="${newPostgres}/bin"
export OLDDATA="${cfg.dataDir}"
export OLDBIN="${cfg.package}/bin"
export OLDBIN="${cfg.finalPackage}/bin"
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
cd "$NEWDATA"
sudo -u postgres $NEWBIN/initdb -D "$NEWDATA" ${lib.escapeShellArgs cfg.initdbArgs}
sudo -u postgres "$NEWBIN/initdb" -D "$NEWDATA" ${lib.escapeShellArgs cfg.initdbArgs}
sudo -u postgres $NEWBIN/pg_upgrade \
sudo -u postgres "$NEWBIN/pg_upgrade" \
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
--old-bindir $OLDBIN --new-bindir $NEWBIN \
--old-bindir "$OLDBIN" --new-bindir "$NEWBIN" \
"$@"
'')
];