I connected to heroku postgres database with pgadmin and created a simple table that has two simple columns:
id - bigint identity
name - text
and simple two rows:
id name
1 name1
2 name2
When I execute the command
heroku pg:pull DATABASE_URL mylocaldb1234 --app nameless-dusk-05113
I get the error:
pg_restore: error: unrecognized data block type (0) while searching archive
! pg_restore errored with 1
I checked postgres local and remote versions, they are the same. Local version:
psql --version
psql (PostgreSQL) 12.5
pg_restore --version
pg_restore (PostgreSQL) 12.5
Remote version:
heroku pg:info
=== DATABASE_URL
Plan: Hobby-dev
Status: Available
Connections: 5/20
PG Version: 12.5
Created: 2021-01-07 07:29 UTC
Data Size: 8.2 MB
Tables: 1
Rows: 2/10000 (In compliance)
Fork/Follow: Unsupported
Rollback: Unsupported
Continuous Protection: Off
Add-on: postgresql-spherical-97042
remote pg_restore version:
heroku run pg_restore --version
Running pg_restore --version on ⬢ nameless-dusk-05113... up, run.7775 (Free)
pg_restore (PostgreSQL) 12.5 (Ubuntu 12.5-1.pgdg18.04+1)