nixos/doc: include extensions in postgresql upgrade script

This commit is contained in:
Kai
2025-03-24 20:17:17 +01:00
parent 3ddf642adf
commit 4867d68ec9

View File

@@ -207,15 +207,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" \
"$@"
'')
];