How I can check whether 2 databases despite being in different postgresql servers of versions are the same?
-
15-03-2021 - |
Question
I copied an existing posttgresql database from one server to another. The source of my data is a postgresql 9.6 whilst the newer server is in postgresql 11.
So I want to know how I can check that both databases have the same schema and data in a fast and easy way?
Solution
You cannot do that in a fast way.
The best you can do is to dump both databases using pg_dump
from v11 and compare the files with diff
.
If you want to do that just to ensure that the migration was successful, don't. If you don't trust PostgreSQL's upgrade process, why should you trust pg_dump
?
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange