Users are encountering failures during Discourse app rebuilds due to PostgreSQL upgrades, specifically when upgrading from version 9.5 to 10. The error indicates insufficient disk space, despite users reporting ample free space (e.g., 23GB or 26GB available). Jose_C_Gomez initially faced the issue and resolved it temporarily by reverting to the older PostgreSQL template, though the root cause remained unclear. pfaffman suggested checking disk usage inside the container, which Jose_C_Gomez confirmed showed ~20GB free. itsbhanusharma and codinghorror clarified that PostgreSQL requires roughly 2x the uncompressed database size for upgrades — not total disk space — which may explain the failure even with apparent free space. Jose_C_Gomez noted backups are ~3GB compressed, implying ~10GB uncompressed. pfaffman recommended using du -h /var/discourse/shared/standalone/postgres_data to check actual DB size. Ignacio_Carrera reported a similar issue with a 329MB database and 26GB free space, suggesting the problem may persist even with seemingly sufficient space. Others, including dhoop and pzubkiewicz, confirmed encountering the same error. pfaffman referenced a PostgreSQL 12 update guide for additional context. The core issue appears to be PostgreSQL’s space requirement during upgrades, which may not align with users’ perception of available space.
Trying to do a launcher rebuild and getting this error
I, [2018-06-30T18:56:08.346656 #17] INFO -- :
I, [2018-06-30T18:56:08.346728 #17] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2018-06-30T18:56:08.357457 #17] INFO -- :
I, [2018-06-30T18:56:08.357700 #17] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2018-06-30T18:56:08.359892 #17] INFO -- :
I, [2018-06-30T18:56:08.360109 #17] INFO -- : > /root/upgrade_postgres
I, [2018-06-30T18:56:08.374537 #17] INFO -- : Upgrading PostgreSQL from version 9.5 to 10
WARNING: Upgrading PostgresSQL would require an addtional 13M 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.9.5.template.yml" in containers/app.yml
FAILED
--------------------
Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 68 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "/root/upgrade_postgres"
a6266e7beac5a72d92ef181ff8c75b6999b94f5c7831622943c7773a04652c5d
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
It appears to be failing upgrading PostGre because it needs more space? I have plenty of space 23GB
Run: ./launcher rebuild app
FAILED
--------------------
Pups::ExecError: /root/upgrade_postgres failed with return #<Process::Status: pid 66 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params "/root/upgrade_postgres"
ba104fb4aff36d211ccb42e81365851f64e38219f0d00a336051643fd4255740
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
And my DB is ~330mb
# du -h /var/discourse/shared/standalone/postgres_data
…
329M /var/discourse/shared/standalone/postgres_data