pg_dump of a 4 GB+ PostgreSQL Database directly on a mounted S3 bucket gives error

Viewed 277

I have mounted S3 bucket in CentOS 6.8 on the partition '/var/db/s3' other than the one reserved for PostgreSQL database. Then, I took a dump of the database, as root user, in mountpoint 'mon' (S3 bucket) using the following command:

# pg_dump --blob -Fc testdb -f /var/db/s3/mon/testdb_bk

It fails with the following error:

pg_dump: [custom archiver] could not close archive file: Input/output error

Then, I tried the same on a local partition, /var, and it worked. The size of the database dump was about 4.5 GB.

I then tried to write another database, that was much smaller in size, about 65 MB using the same procedure on the mounted S3 bucket and it worked fine!

I can't figure out why 4.5 GB database is giving error while writing directly on a mounted S3 bucket and a smaller database dump goes fine.

Please suggest.

0 Answers
Related