Skip to main content
3dmikec-5bc707d0

5 days ago

pg_dump error

I'm following along with the lecture "Interacting with External Processes: Utilizing `pg_dump`" in the "Introduction to Python Development" course. I run the line

dump = pgdump.dump('postgres://pguser:pgpassword@3.89.44.211:80/sample')

using my username, password and IP address but I get the error "pg_dump: server version: 9.6.8; pg_dump version 9.2.24

pg_dump: aborting because of server version mismatch

pg_dump: [archiver (db)] connection to database "sample" failed: could not connect to server: Connection timed out. "

I installed postgres9.6 as instructed in a previous lecture but when I check the version with psql -V it shows 9.2.24

Image of
4 days ago
It sounds like you may have a path set where it is finiding an older version. Make sure the binary commands are only in one place and that the directory where they are is first in your path.