CSV export via COPY TO STDOUT, plus a CSV-aware verifier

OtherKlusterServices
Shipped
August 9, 2026 at 10:06 PM UTC
Author
Kamo
Commit
e524daa

Transport is COPY ... TO STDOUT WITH (FORMAT CSV), not `cockroach sql --format=csv`. The latter renders SQL NULL as the literal string "NULL", indistinguishable from a real value, which would have silently converted every NULL in the database into text on import. COPY emits true PostgreSQL CSV -- NULL as an empty unquoted field, '' as a quoted "" -- which is exactly what YugabyteDB's COPY FROM expects. The verifier counts CSV records rather than lines, because quoted fields carrying embedded newlines make a row span several lines and wc -l overcounts them. Result: 824/825 tables match the baseline exactly. The single difference is commit_logs at +1 row, written by live traffic between the two captures and stable since -- which is why the authoritative capture happens during the downtime window.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing