Large postgres script causes 'no space left on device' error
Автор: Emrah KAYA
Загружено: 2025-04-15
Просмотров: 4
Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram: / ky.emrah
Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!Large postgres script causes 'no space left on device' error
I'm running a fairly large sql script (aprox 300k insert statements) against a postgres database and I'm getting a 'no space left on device' error.
I know this error means there isn't enough disk space for postgres to complete the operation, but the odd thing is that if I split the file into 10 pieces and run each one individually it completes without any error, and once all the rows are inserted there is still plenty of disk space left over.
The sql script creates a few tables and then has thousands of individual insert statements, and then creates some indexes at the end. I've left the default auto-commit behaviour in place, I know this isn't optimal from a performance point of view but that's not an issue for me in this case.
Does postgres create some temporary files while processing a sql script that might be causing the issue?
Not sure it's relevant but I'm running the script via ansible, and the postgres db is in a docker container.
Tags: postgresqlSource of the question:
https://stackoverflow.com/questions/7...
Question and source license information:
https://meta.stackexchange.com/help/l...
https://stackoverflow.com/
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: