Skip to content

Releases: serenorg/database-replicator

v7.2.2: Improve error messages for publication/subscription failures

06 Jan 00:56
476bc56

Choose a tag to compare

🚀 database-replicator v7.2.2

[7.2.2] - 2026-01-05

Improved

  • Better error messages for publication/subscription failures: Publication and subscription creation errors now extract the full PostgreSQL error including error code, message, detail, and hint. Previously, errors would show unhelpful "db error" messages instead of the actual PostgreSQL error (e.g., missing privileges, table not found).

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0

v7.2.1: Bump version to 7.2.1

05 Jan 22:40
c781b4a

Choose a tag to compare

🚀 database-replicator v7.2.1

[7.2.1] - 2026-01-05

Fixed

  • Add-tables mode: drop existing tables before restore: When using Add mode (init --include-tables on existing database), the specified tables are now dropped before schema restore. This fixes "relation already exists" errors when tables exist on the target.

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0

v7.2.0: Bump version to 7.2.0

05 Jan 22:03
7012d91

Choose a tag to compare

🚀 database-replicator v7.2.0

[7.2.0] - 2026-01-05

Added

  • Add tables to existing database without dropping (closes #95): When using init --include-tables on a target database that already exists with data, users are now offered three choices:

    • [A] Add - Add only the specified tables to the existing database (preserves existing data)
    • [D] Drop - Drop and recreate the entire database (deletes all existing data)
    • [Q] Quit - Abort the operation

    This enables incremental table addition to existing replication setups without losing previously synced data. With -y flag and --include-tables, Add mode is automatically selected.

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0

v7.1.2

05 Jan 19:54
a9e4fd6

Choose a tag to compare

🚀 database-replicator v7.1.2

[7.1.2] - 2026-01-05

Fixed

  • Pre-flight checks now respect --include-tables filter (closes #94): When running init --local with --include-tables, pre-flight checks now only validate SELECT permissions on the filtered tables instead of all tables in the database. Previously, users would get permission errors for tables they weren't even trying to replicate.

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0

v7.1.1

01 Jan 19:51
77ca6ed

Choose a tag to compare

🚀 database-replicator v7.1.1

[7.1.1] - 2026-01-01

Fixed

  • Connection closed after DROP DATABASE (closes #93): When dropping and recreating a target database, the CREATE DATABASE command now uses a fresh connection to the postgres admin database instead of reusing the stale connection that was terminated when the database was dropped.

  • SerenDB URL parsing for non-UUID hostnames (closes #93): Remote execution no longer fails when the SerenDB target URL doesn't contain embedded UUIDs in the hostname. The code now gracefully falls back to using just the connection string.

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0

v7.1.0

01 Jan 07:53
a353b7f

Choose a tag to compare

🚀 database-replicator v7.1.0

[7.1.0] - 2025-12-31

Added

  • COPY FROM STDIN for 5-10x faster JSONB migrations (closes #92): SQLite, MongoDB, and MySQL migrations now use PostgreSQL's COPY protocol instead of batch INSERT statements. This provides massive throughput improvements for large datasets - a 7.2M row migration that took ~70 minutes now completes in ~10-15 minutes.

  • Better error information on remote job failures: When a remote replication job fails, the CLI now displays exit code, stderr, logs, and stdout (if returned by the API). When no detailed error info is available, provides troubleshooting guidance including common causes and suggests running with --local to debug.

  • Warning when all tables are schema-only: Interactive mode now warns users when ALL selected tables are marked as schema-only (no data transfer). This prevents accidental configurations where users expect data to be replicated but only schema structures are transferred.

  • Extended JobStatus fields: Added stdout, stderr, logs, and exit_code fields to capture detailed error information from remote job execution.

Fixed

  • DROP DATABASE error "cannot drop the currently open database": The init command now connects to the postgres maintenance database before dropping target databases, fixing the PostgreSQL error that prevented database recreation.

  • Windows build for sqlite-watcher: Added bundled-windows feature to rusqlite dependency in sqlite-watcher, fixing Windows builds that failed due to missing sqlite3.lib.

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0

v7.0.14

11 Dec 22:48

Choose a tag to compare

🚀 database-replicator v7.0.14

[7.0.14] - 2025-12-11

Fixed

  • Avoid duplicate JSONB IDs for SQLite tables without primary keys: the ID detector now only uses real primary keys or candidate columns that are provably unique. Tables like prices with repeated id values fall back to row-number IDs, preventing immediate prices_pkey violations during inserts.

Added

  • Duplicate-ID regression tests covering both the rejection path (when duplicates exist) and the acceptance path for unique-but-not-PK TEXT IDs.

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0

v7.0.13

11 Dec 22:31

Choose a tag to compare

🚀 database-replicator v7.0.13

[7.0.13] - 2025-12-11

Fixed

  • SQLite re-runs are now deterministic: truncate_jsonb_table() now logs at INFO level, verifies the target table is empty, and errors early if rows remain instead of failing later with duplicate primary keys.
  • --drop-existing works for SQLite: When the flag is supplied, each JSONB table is dropped before recreation, ensuring a pristine schema even if manual changes were made to the target database.

Added

  • drop_jsonb_table() helper: Shared helper allows future workflows (and the SQLite path today) to explicitly remove JSONB tables when a clean rebuild is required.

Added

  • Memory-efficient SQLite migration: SQLite to PostgreSQL migration now processes rows in batches instead of loading entire tables into memory. This enables migration of large SQLite databases (7M+ rows, multi-GB files) without OOM errors. Batch size automatically adjusts based on available system memory.

Changed

  • SQLite converter uses memory-based batch sizing: Like the xmin sync, SQLite migration now uses calculate_optimal_batch_size() to determine batch size (25% of available RAM, clamped to 1K-50K rows).

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0

v7.0.12

11 Dec 21:53

Choose a tag to compare

🚀 database-replicator v7.0.12

[7.0.12] - 2025-12-11

Added

  • Memory-efficient SQLite migration: SQLite to PostgreSQL migration now processes rows in batches instead of loading entire tables into memory. This enables migration of large SQLite databases (7M+ rows, multi-GB files) without OOM errors. Batch size automatically adjusts based on available system memory.

Changed

  • SQLite converter uses memory-based batch sizing: Like the xmin sync, SQLite migration now uses calculate_optimal_batch_size() to determine batch size (25% of available RAM, clamped to 1K-50K rows).

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0

v7.0.11

10 Dec 20:41

Choose a tag to compare

🚀 database-replicator v7.0.11

[7.0.11] - 2025-12-10

Fixed

  • Critical: ctid parameter serialization failure in batched sync: Fixed bug where batched xmin sync would fail after the first batch with "cannot convert between Rust type &String and Postgres type tid". The ctid value was being passed as a parameterized query argument, but tokio-postgres cannot serialize Rust strings to PostgreSQL's tid type. Now inlines the ctid value in the query (with format validation to prevent SQL injection).

📦 Installation

From crates.io:

cargo install database-replicator

Download binaries:

  • Linux (x64): database-replicator-linux-x64-binary
  • macOS (Intel): database-replicator-macos-x64-binary
  • macOS (Apple Silicon): database-replicator-macos-arm64-binary
chmod +x database-replicator-*-binary
./database-replicator-*-binary --version

🔗 Links

License

Apache License 2.0