How to Compare and Synchronize PostgreSQL Data | dbForge Studio + AI Assistant
Comparing PostgreSQL databases helps identify data differences, verify migrations and deployments, restore missing records, and keep development, staging, and production environments in sync.
In this video, you will learn how to compare and synchronize PostgreSQL data using dbForge Studio for PostgreSQL. We walk through the complete data comparison workflow, from selecting source and target databases and configuring comparison options to reviewing differences and generating a synchronization script.
You will also see how to map tables, views, and schemas with different names, compare table data against custom query results, filter rows with WHERE conditions, and select differences to be synchronized.
After synchronization, we use the integrated dbForge AI Assistant to generate a context-aware SQL query and retrieve data from the updated database.
💡 What you will learn in this video
▪︎ How to start a PostgreSQL data comparison
▪︎ How to configure comparison options
▪︎ How to map tables, views, and schemas
▪︎ How to filter rows with WHERE conditions
▪︎ How to review data differences
▪︎ How to select records for synchronization
▪︎ How to generate and review a synchronization script
▪︎ How to verify synchronization results
▪︎ How to generate SQL with dbForge AI Assistant
✨ PostgreSQL Data Compare features covered
✔ Source and target database comparison
✔ Table, view, and schema mapping
✔ Custom query comparison
✔ Row filtering
✔ Detailed comparison results
✔ Selective data synchronization
✔ SQL synchronization scripts
✔ Integrated dbForge AI Assistant
dbForge Studio for PostgreSQL provides tools for comparing, analyzing, and synchronizing PostgreSQL data, as well as SQL development, database management, migration, and AI-assisted SQL generation and optimization.
The Studio supports PostgreSQL and related cloud databases, including Supabase, Amazon Redshift, Amazon RDS, Amazon Aurora, Heroku, Azure Database for PostgreSQL, and many others.
📌 Timestamps
0:00 Introduction
0:31 Start data comparison
0:51 Configure comparison settings
1:30 Review data differences
1:58 Synchronize PostgreSQL data
2:38 Review and run a sync script
2:55 Verify synchronization
3:09 Generate SQL with dbForge AI Assistant
Links for the video description
✅ dbForge Studio for PostgreSQL:
https://www.devart.com/dbforge/postgresql/studio/
🔥 Download dbForge Studio for PostgreSQL:
https://www.devart.com/dbforge/postgresql/studio/download.html
👉 dbForge AI Assistant:
https://www.devart.com/dbforge/ai-assistant/
🛠 dbForge tools for PostgreSQL:
https://www.devart.com/dbforge/postgresql/
🔔 Subscribe to the Devart channel:
https://www.youtube.com/c/DevartSoftware
#PostgreSQL #Postgres #dbForgeStudio #DataCompare #DatabaseSynchronization #PostgreSQLTools #SQL #AIAssistant #DatabaseMigration
Closed Caption:
Welcome to dbForge Studio
for PostgreSQL tutorials.
In this video, we'll show you how
easy it is to identify, scrutinize,
and synchronize differences in data
across your PostgreSQL databases.
Whether you need to examine the differences
between development and production databases,
perform a recovery, or simply
migrate data to a different instance,
you can do it with dbForge Studio,
a multifeatured IDE for PostgreSQL,
Supabase, Amazon Redshift, and a number
of related cloud databases and services.
Your first step is to start a new data comparison.
The wizard will greet you with a page
divided into Source and Target sections.
Here, you need to specify the
connections and databases to be compared.
After you do that, you can either click Compare to
start the comparison right away—or
take a little time to customize it.
We'll go with the latter.
On the Options page, you have a number
of options to tweak the comparison with.
For your convenience, a brief
description is provided for each option.
On the Mapping page, you can include
or exclude objects from the comparison.
Here, you can open the Objects Mapping dialog
to map tables and views that have different names.
Next, you can open the Schemas Mapping dialog
to map tables from different schemas.
Then, you can open the
Custom Queries Mapping dialog
to compare table data with
the results of a custom query.
And finally, you can set a WHERE condition
to filter out the rows that
you don't want to compare.
That's it! Once you are ready,
you can start the comparison.
In a few moments, the comparison
document with the results will appear.
As you can see, they are
grouped into several tabs.
You can view the records that
are present only in the source,
you can check the records that
are present in both source
and target, yet contain different data,
and you can see the records that
are present only in the target.
This grouping will help you make sure
you don't lose any data by accident.
You can exclude the unwanted differences from
further synchronization by clearing the
corresponding checkboxes in the results.
Now, let's open the synchronization
wizard to generate a script that will
sync the source to the target. On the Output page,
you have three options depending on the
deployment process you'd like to follow.
You can select to open the script in
order to double-check it before execution,
you can save it to run later, or you can
execute it directly against the target database.
We'll go with the first option.
Similarly to the comparison process,
you can configure a few synchronization options,
and add custom scripts to be executed
before or after the synchronization.
Finally, on the Summary page, you can review the
warnings and the actions that will
be taken during the synchronization.
Once you are ready, hit Synchronize.
Since we have selected to open the script
before running it, here it is, in the editor.
It's accurate, concise, and easy to read,
which is essential if your colleagues
will have to review or execute it.
By the way, before hitting Execute,
make sure you've backed up your
target database, just in case.
And there we go!
To make sure our synchronization
has been successful,
let's refresh the results in the comparison
document with the corresponding button.
As you can see, now the source
and the target are identical.
Now it's time to retrieve
data from our target database.
To do that, we can auto-generate a query using
dbForge AI Assistant, which creates, explains,
optimizes, and troubleshoots
SQL code in a familiar AI chat.
It's designed to streamline SQL development
with speed, ease of use, and context awareness.
After our query is generated, we can run it.
Want to try it all yourself?
That's easy!
Download dbForge Studio for free, give it a go,
and make your data management
nearly effortless today!
Video Length: 03:45
Uploaded By: Devart
Published: 9/14/2026
View Count: 84