Skip to content

Commit 9c25f36

Browse files
committed
testing upgrades
1 parent f2162a0 commit 9c25f36

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

13/Dockerfile.fedora

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ COPY root/usr/libexec/fix-permissions /usr/libexec/fix-permissions
4747
RUN INSTALL_PKGS="rsync tar gettext bind-utils postgresql-server postgresql-contrib nss_wrapper " && \
4848
INSTALL_PKGS+="findutils xz" && \
4949
INSTALL_PKGS+=" pgaudit" && \
50+
INSTALL_PKGS+=" procps-ng util-linux postgresql-upgrade" && \
5051
dnf -y module enable postgresql:13 && \
5152
dnf -y --setopt=tsflags=nodocs install $INSTALL_PKGS && \
5253
rpm -V $INSTALL_PKGS && \

13/root/usr/share/container-scripts/postgresql/common.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ function wait_for_postgresql_master() {
297297
run_pgupgrade ()
298298
(
299299
# Remove .pid file if the file persists after ugly shut down
300-
if [ -f "$PGDATA/postmaster.pid" ] && ! pgrep -f "postgres" > /dev/null; then
300+
if [ -f "$PGDATA/postmaster.pid" ]; then
301301
rm -rf "$PGDATA/postmaster.pid"
302302
fi
303303

@@ -308,11 +308,11 @@ run_pgupgrade ()
308308
if test "$old_raw_version" = 92; then
309309
old_collection=postgresql92
310310
else
311-
old_collection=rh-postgresql$old_raw_version
311+
old_collection=postgresql-$old_raw_version
312312
fi
313313

314-
old_pgengine=/opt/rh/$old_collection/root/usr/bin
315-
new_pgengine=/opt/rh/rh-postgresql${new_raw_version}/root/usr/bin
314+
old_pgengine=/usr/lib64/pgsql/$old_collection/bin
315+
new_pgengine=/usr/bin
316316
PGDATA_new="${PGDATA}-new"
317317

318318
printf >&2 "\n========== \$PGDATA upgrade: %s -> %s ==========\n\n" \
@@ -352,7 +352,7 @@ run_pgupgrade ()
352352
info_msg "Starting old postgresql once again for a clean shutdown..."
353353
"${old_pgengine}/pg_ctl" start -w --timeout 86400 -o "-h ''"
354354
info_msg "Waiting for postgresql to be ready for shutdown again..."
355-
"${old_pgengine}/pg_isready"
355+
# "${old_pgengine}/pg_isready"
356356
info_msg "Shutting down old postgresql cleanly..."
357357
"${old_pgengine}/pg_ctl" stop
358358

0 commit comments

Comments
 (0)