0

I just did a migration from Postgres 9.4 to 10 database. How to verify if everything is okay?

I tried to look into huge tables, the rows are different (somehow in Postgres 10 then are more rows than in 9.4)

PSQL 9.4: 14 583 936 
PSQL 10:  14 880 545 

here are my pg_dump and pg_restore commands which were executed without errors, but took very long process, dump was 12hours, while pg_restore 10hours:

pg_dump    -U postgres -d hive -Z1 -Fc -f /mnt/offline_backups/hive_full_2019-03-01_1630.dmp 2> /mnt/offline_backups/hive_full_2019-03-01_1630.log
pg_restore -U postgres -d hive -v         /mnt/offline_backups/hive_full_2019-03-01_1630.dmp

both commands were without errors whatsoever.

Here some screenshots from pgadmin 4v: enter image description here

In both DB I just sorted rows count in descending order.

As you can see, rows inserted is quite different.

Here is summary:

enter image description here

  • Those numbers are only estimates. The only way to get the real row count is to run select count(*) on every table. – a_horse_with_no_name Mar 2 at 21:57
0

Thanks to A_horse_with_no_name for a suggestion, i did some of the tables select count(*) and returned identical rows for each table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.