1

I want to upgrade a large PostgreSQL database using the following command:

docker-compose exec db pg_dumpall -U app | docker-compose exec -T db16 psql -U app 

I expected the upgrade to require roughly twice the current database size, but it seems to need significantly more space than anticipated. Currently, there are 161 GB of available space, and the database occupies 123 GB, which should have left sufficient free space. However, I encountered an issue where I ran out of space.

Is there any way to optimize the upgrade process to reduce the amount of additional space required?

3
  • Did you try first to make vacuum full? Commented Aug 18, 2024 at 16:07
  • @RomeoNinov No, but I think this would also only "shrink" the size of the source database (if there's anything left to be cleaned up) but not have any effect on the migration itself, right? Commented Aug 19, 2024 at 12:38
  • Right, but this will reduce (eventually) the size of the database and can make the process of migration smooth (because of smaller size) Commented Aug 19, 2024 at 12:54

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.