Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 919
Flaviu Avatar asked Feb 10 '12 22:02

Flaviu


1 Answers

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.

like image 180
fnl Avatar answered Oct 16 '22 11:10

fnl