Validate a SQL Server to PostgreSQL migration
Use this playbook to compare migrated SQL Server data with PostgreSQL and separate transfer defects from intentional type conversions. Begin with one critical table, then expand to every agreed partition. A completed demonstration workflow is useful product evidence; it is not certification of your migration or a performance benchmark.
An observed demonstration run
A completed DataDios demonstration workflow captured on October 27, 2026 compared dd_demo_sql_server with dd_demo_postgresql. The Results view showed 8 tables, 328,220 rows compared, 244,319 matches and 83,901 diffs. These are observed UI totals for demonstration data, not a certified benchmark or results from your migration.

One listed table had zero rows and displayed 100% accuracy. An empty table is not evidence of exercised row coverage. Inspect counts and scope along with percentages, and examine the table-level differences before making an acceptance decision. This observed product run is separate from the synthetic SQL lab and browser CSV example below.
1. Write the table and key contract
Record the SQL Server database/schema/table and PostgreSQL database/schema/table for each pair. For example, map SQL Server sales.orders to PostgreSQL sales.orders, explicitly pairing OrderId with order_id. Record the actual names, selected columns and renamed fields in the validation checklist.
Check that the comparison key is unique and non-null in the exact scope on both sides. Do not assume a copied identity value proves uniqueness or that the primary-key metadata describes the migrated data correctly. Stop and resolve duplicate keys before interpreting row differences.
Agree on a consistent source snapshot or reconciled extraction watermark and its corresponding target load. Two independent query times are not a shared snapshot. Capture the cutoff and partition manifest with the results.
2. Verify read access on both sides
Create and test the SQL Server connection and PostgreSQL connection. Use the intended comparison identity to verify access to each selected table and its metadata, not merely a successful login.
The PostgreSQL role needs database connection access, schema usage and table reads. On SQL Server, verify database access and reads on the chosen schema/tables under your organization's permission model. Keep migration write credentials separate from comparison access.
3. Map and run a small agreed scope
Follow Data Source Diff: select SQL Server as Source, PostgreSQL as Target, map corresponding tables and review every column pair. Select the comparison key explicitly and review its type on both sides. Automatic name matching is a proposal, not evidence that the semantics match.
Prepare snapshot or staging tables with aligned cutoffs before Data Source Diff. Its FILTER_DIFF WHERE expression selects table and column metadata; it does not apply separate row-level cutoff predicates to the source and target. For row-level scoping, use Query Diff with equivalent WHERE predicates in the two queries. Resolve validation errors and run the diff. Inspect row-level differences alongside metadata and summaries. Equal counts and totals can coexist with missing, unexpected and changed rows; reproduce that failure mode in the PostgreSQL lab.
4. Review conversions that can hide a defect
| Concern | Validation decision |
|---|---|
| Decimal and money values | DataDios maps decimal comparison values to double precision. Use independent exact-decimal checks or a specified canonical text projection when exact financial precision matters. A clean diff alone does not establish exact high-precision equality. |
| Timestamp meaning | Establish whether values represent UTC instants or local wall-clock time, which source timezone applies, and what precision the target retains. Do not drop offsets to make displayed values match. |
| Null and empty strings | Preserve the distinction unless the data owner explicitly approves a transformation. Retain raw values with the normalized comparison. |
| Case and whitespace | Decide whether case, trailing spaces and collation differences matter to the application. Do not assume the two database collations define identical equality. |
| Native types and identifiers | Review renamed columns and intentional type mappings. Explain expected metadata differences instead of suppressing all metadata failures. |
See mismatch investigation. Its SQL examples use PostgreSQL syntax; do not paste them unchanged into SQL Server. Any canonical projection must define scale, rounding, timezone and null encoding and be checked against edge cases first.
5. Scale with a complete coverage record
Data Source Diff can read a whole table when it cannot plan key-range batches. A compatible batchable key helps, but the batch-size setting is not a guaranteed row or memory ceiling: skew can produce larger ranges. Choose bounded partitions and retain evidence that each completed.
Query Diff streams ordered results through connector reads, while the databases still perform scan and sort work. Review the query and resource budget before expanding to large tables. A sample demonstrates only the examined scope.
6. Reconcile, repair and rerun
Record source rows, target rows, unchanged rows, changed rows, keys missing from target and unexpected target keys. Reconcile business totals in meaningful groups such as currency or status, with separate precision-sensitive checks. Give every exception an owner and an explicit disposition.
Repair through the migration process, rerun affected partitions, and retain both the initial failures and final evidence. Use the synthetic report as a reporting structure; replace all sample numbers with actual run evidence. Test application behavior, access controls, performance and recovery separately before cutover.
Review your SQL Server to PostgreSQL validation plan