The `postgresql-upgrade.sh` script arranges to run `pg_upgrade` after a major PostgreSQL version update. It's scheduled by a systemd unit, _postgresql-upgrade.service_, which runs only after an OS update.
19 lines
395 B
Desktop File
19 lines
395 B
Desktop File
[Unit]
|
|
Description=Upgrade PostgreSQL database cluster
|
|
Before=postgresql.service
|
|
Before=systemd-update-done.service
|
|
After=local-fs.target
|
|
RequiresMountsFor=/var/lib/pgsql
|
|
DefaultDependencies=no
|
|
ConditionNeedsUpdate=/var
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=postgres
|
|
ExecStart=+/usr/local/libexec/postgresql-upgrade
|
|
Environment=PG_COLOR=always
|
|
WorkingDirectory=~
|
|
|
|
[Install]
|
|
RequiredBy=postgresql.service
|