Trouble with update 2.5.0.beta4 to 2.6.0.beta2 (probably Postgres)

I started update manually and I get lucky message

Upgrade Complete

Upgrade Complete

Optimizer statistics are not transferred by pg_upgrade so,
once you start the new server, consider running:
    ./analyze_new_cluster.sh

Running this script will delete the old cluster's data files:
    ./delete_old_cluster.sh
-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES COMPLETE

Old 10 database is stored at /shared/postgres_data_old

To complete the upgrade, rebuild again using:

./launcher rebuild app

Then I started rebuild once again and failed this way

Update Failure
root@dastereo:/var/discourse# ./launcher rebuild app
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
cd /pups && git pull && /pups/bin/pups --stdin
Already up to date.
I, [2020-08-28T22:15:49.237202 #1]  INFO -- : Loading --stdin
I, [2020-08-28T22:15:49.246474 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2020-08-28T22:15:49.309866 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2020-08-28T22:15:49.310349 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2020-08-28T22:15:49.316184 #1]  INFO -- :
I, [2020-08-28T22:15:49.316596 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2020-08-28T22:15:49.319934 #1]  INFO -- :
I, [2020-08-28T22:15:49.320186 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2020-08-28T22:15:49.323330 #1]  INFO -- :
I, [2020-08-28T22:15:49.323567 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2020-08-28T22:15:49.326569 #1]  INFO -- :
I, [2020-08-28T22:15:49.326949 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2020-08-28T22:15:49.330237 #1]  INFO -- :
I, [2020-08-28T22:15:49.330539 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2020/08/28 22:15:49 socat[27] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2020-08-28T22:15:49.344063 #1]  INFO -- :
I, [2020-08-28T22:15:49.344291 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2020-08-28T22:15:49.347499 #1]  INFO -- :
I, [2020-08-28T22:15:49.347672 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2020-08-28T22:15:49.350643 #1]  INFO -- :
I, [2020-08-28T22:15:49.350781 #1]  INFO -- : > mkdir -p /shared/postgres_run/12-main.pg_stat_tmp
I, [2020-08-28T22:15:49.353189 #1]  INFO -- :
I, [2020-08-28T22:15:49.353352 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/12-main.pg_stat_tmp
I, [2020-08-28T22:15:49.355623 #1]  INFO -- :
I, [2020-08-28T22:15:49.360998 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown:
I, [2020-08-28T22:15:49.365799 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown:
I, [2020-08-28T22:15:49.370537 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown:
I, [2020-08-28T22:15:49.375055 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown:
I, [2020-08-28T22:15:49.375336 #1]  INFO -- : > chown -R root /var/lib/postgresql/12/main
I, [2020-08-28T22:15:49.944663 #1]  INFO -- :
I, [2020-08-28T22:15:49.944814 #1]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/12/bin/initdb -D /shared/postgres_data || exit 0
I, [2020-08-28T22:15:49.947279 #1]  INFO -- :
I, [2020-08-28T22:15:49.947680 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2020-08-28T22:15:50.017730 #1]  INFO -- :
I, [2020-08-28T22:15:50.018101 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2020-08-28T22:15:50.020860 #1]  INFO -- :
I, [2020-08-28T22:15:50.021056 #1]  INFO -- : > /root/upgrade_postgres
I, [2020-08-28T22:15:50.062719 #1]  INFO -- : Upgrading PostgreSQL from version 10 to 12
WARNING: Upgrading PostgresSQL would require an addtional 70G of disk space
Please free up some space, or expand your disk, before continuing.

To avoid upgrading change "templates/postgres.template.yml" TO "templates/postgres.10.template.yml" in containers/app.yml



FAILED
--------------------
Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 46 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "/root/upgrade_postgres"
fffe5d64258419a99ad85d9d9a2da7a7cde0642ac7fd99e197c6f548712f72eb
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

I have large 70GB data base, but I have enough free space to update.
I do have pretty old initial install from July 2015.

Please advise me something to check/correct.

THANKS

2 Likes

I’ve just postponed PG12 update with "templates/postgres.10.template.yml" in app.yml but I’m still would like to update PG.

Thanks

3 Likes

The error seems pretty apparent to me

WARNING: Upgrading PostgresSQL would require an addtional 70G of disk space
Please free up some space, or expand your disk, before continuing.

You’re missing disk space to do the upgrade. How much free space do you have?

3 Likes

Partitions with Postgress base (currunt DB 70GB )
/dev/disk/by-label/DOROOT 330146412 137824104 175528936 44% /

Additional volume with images
/dev/sda 207932088 158390772 40066880 80% /mnt/volume_lon1_01

1 Like

Is it safe enough to try “templates/postgres.template.yml” once again?

Thanks