PostGres image: crunchy postgres: centos7-11.1-2.2.0
I am new to docker containers, but am running a PostGres instance in one - it is around 800GB in size.
I can run a backup using:
docker exec containerid pg_dump -Fc DBNAME > pg_backup.fc
or by going into the container:
docker exec -it containerid /bin/sh
and then running
pg_dump -Fc DBNAME > pg_backup.fc
The two output files would be in two different places - the first in the host machine, the second in the container volume.
My question(s) is this - going into the container tells pg_dump to send its output directly to the file
whereas the first command sends its output to stdout, then gets redirected to the host machines file system
Is there an “overhead” to doing this?
Is my container going to run more slowly while it tries to send 800GB to stdout, rather than having it go straight to the file in the volume?