I recently came across an issue on a shared PostgreSQL server that has a really low statement timeout set that was causing pg_dump to terminate before it got very far. After a little hunting, I found a post on the pgsql-general mailing list with the the solution. The key is to export a command-line flag using PGOPTIONS when running pg_dump:

PGOPTIONS="-c statement_timeout=0" pg_dump test