# pgclone v4.0.0: Native SQL-Based Database Cloning and Data Masking **Baku, Azerbaijan — April 22, 2026**
I am pleased to announce the release of **pgclone** version 4.0.0, a PostgreSQL extension that clones databases, schemas, and objects directly via SQL. It features built-in data masking, parallel background workers, and full DDL support — with no dependency on `pg_dump`, `pg_restore`, or external shell scripts. pgclone is released as open source under the PostgreSQL Licence. ## Description **pgclone** provides a seamless way to clone PostgreSQL objects across instances using nothing but SQL commands. By leveraging the PostgreSQL `COPY` protocol and custom Background Workers (BGW), it offers a high-performance, integrated alternative to traditional dump/restore workflows. ## Key Capabilities - **Native SQL Interface:** Clone databases, schemas, and tables without leaving `psql` or managing shell scripts. - **Integrated Data Masking:** Anonymize sensitive data (emails, names, phone numbers, hashes) during the cloning process using built-in masking functions. - **Auto-Discovery:** Automatically scan source schemas to identify sensitive columns and receive suggested masking rules. - **High Performance:** Parallel background workers handle concurrent table cloning, with real-time progress tracking via `pgclone.jobs_view`. - **Full DDL Support:** Preserves indexes, constraints (PK, UNIQUE, CHECK, FK, EXCLUDE), triggers, views, and sequences. - **Flexible Conflict Resolution:** Choose between `error`, `skip`, `replace`, or `rename` strategies when objects already exist. - **Cross-Version Compatibility:** Tested on PostgreSQL 14, 15, 16, 17, and 18. - **Open Source:** Distributed under the PostgreSQL Licence — the same permissive licence used by PostgreSQL itself. ## Links & Resources We welcome contributions and feedback from the community to help make pgclone even better. - **GitHub:** https://github.com/valehdba/pgclone - **Release v4.0.0:** https://github.com/valehdba/pgclone/releases/tag/v4.0.0 - **PGXN:** https://pgxn.org/dist/pgclone/4.0.0/ - **Usage Guide:** https://github.com/valehdba/pgclone/blob/main/docs/USAGE.md - **Async Operations:** https://github.com/valehdba/pgclone/blob/main/docs/ASYNC.md - **Architecture:** https://github.com/valehdba/pgclone/blob/main/docs/ARCHITECTURE.md - **Manual Testing:** https://github.com/valehdba/pgclone/blob/main/docs/TESTING_MANUAL.md ---
