Skip to content

Commit ac06f20

Browse files
committed
upgrade: check that pg_upgrade is installed
The server package usually depends on package which brings the pg_upgrade binary, except for SCLs with PostgreSQL 9.4. * postgresql-setup.in (upgrade): Detect non-existent pg_upgrade binary.
1 parent c07e748 commit ac06f20

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

postgresql-setup.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@ upgrade()
230230
error $"Please install the $upgradefrom_package package."
231231
exit 5
232232
fi
233+
if [ ! -x "$PGENGINE/pg_upgrade" ]; then
234+
# The "$PGENGINE/postgres" depends transitively on
235+
# pg_upgrade binary in rather newer packaging, but SCL with PostgreSQL
236+
# 9.4 provides '*-upgrade' package having `pg_upgrade` inside. We need
237+
# to have this installed, too. Keep till {rh,sclo}-postgresql94 is
238+
# still a thing.
239+
error $"Please install the @NAME_PACKAGE@-upgrade package."
240+
exit 5
241+
fi
233242

234243
# Set up log file for pg_upgrade
235244
rm -f "$upgrade_log"

0 commit comments

Comments
 (0)