Search code examples
databasepostgresqlwebfaction

Postgres pg_dump times out


I am running this command on Webfaction:

ionice -c2 -n6 pg_dump --blobs -U mhjohnson_flavma -f dump.sql

pg_dump: SQL command failed
pg_dump: Error message from server: ERROR: canceling statement due to statement timeout

Any ideas on how to change the timeout?


Solution

  • Your server probably has statement-timeouts configured in one way or another. (cf. here)

    As a quick solution, you could use PGOPTIONS="-c statement_timeout=0" pg_dump [...] to temporarily overwrite this setting for the dumping process.