Skip to content

feat(logical): support moving a single table with COPY_DATA - #1882

Open
murex971 wants to merge 5 commits into
mainfrom
murex-single-table-move
Open

murex971 wants to merge 5 commits into
mainfrom
murex-single-table-move

Conversation

@murex971

Copy link
Copy Markdown
Contributor

Usage

Admin console:

COPY_DATA source_db dest_db TABLE sales.orders;
COPY_DATA source_db dest_db TABLE orders my_slot;   -- defaults to public.orders

CLI:

pgdog data-sync --from-database source_db --to-database dest_db --table sales.orders

The table name is table (schema defaults to public) or schema.table. Unquoted
names are lowercased like in Postgres; need to use quotes on the CLI for mixed case,
e.g. '"Sales"."Orders"'. (The admin console lowercases the whole command.)

Note

The source table and its foreign keys are never modified or dropped. That's left to the user.

closes #1822

@codecov

codecov Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.22695% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...gdog/src/backend/replication/logical/table_move.rs 97.22% 5 Missing ⚠️
pgdog/src/cli.rs 88.88% 4 Missing ⚠️
pgdog/src/api/resharding.rs 97.72% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

ProjectPgDog
Branchmurex-single-table-move
TestbedIntel v1

⚠️ WARNING: Truncated view!

The full continuous benchmarking report exceeds the maximum length allowed on this platform.

🚨 4 Alerts

🐰 View full continuous benchmarking report in Bencher

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

ProjectPgDog
Branchmurex-single-table-move
TestbedIntel v1

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
pooler-v3cpu-per-txn
Measure (units)
📈 plot
🚷 threshold
🚨 alert (🔔)
41.03 units
(+1.19%)Baseline: 40.55 units
40.95 units
(100.18%)

Click to view all benchmark results
BenchmarkThroughputBenchmark Result
operations / second (ops/s) x 1e3
(Result Δ%)
Lower Boundary
operations / second (ops/s) x 1e3
(Limit %)
cpu-per-txnBenchmark Result
Measure (units)
(Result Δ%)
Upper Boundary
Measure (units)
(Limit %)
pooler-v3📈 view plot
🚷 view threshold
16.99 ops/s x 1e3
(+0.00%)Baseline: 16.99 ops/s x 1e3
16.82 ops/s x 1e3
(99.00%)
📈 view plot
🚷 view threshold
🚨 view alert (🔔)
41.03 units
(+1.19%)Baseline: 40.55 units
40.95 units
(100.18%)

🐰 View full continuous benchmarking report in Bencher

@murex971
murex971 requested a review from meskill October 28, 2026 18:29
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Metal bench passed. All 150 measures within bounds.

suite throughput cpu/txn user cycles/txn user instr/txn kernel cycles/txn ctx/txn
pooler 26.26 (+0.7% ± 1.0%) 26,270 (-0.4% ± 1.1%) 35,206 (-0.0% ± 0.02%) 38,148 (+2.1% ± 1.5%)
lb 27.19 (+0.5% ± 1.3%) 27,732 (+0.2% ± 1.2%) 36,077 (-0.0% ± 0.03%) 38,902 (+1.2% ± 1.8%)
sharding-w2 48.8 (+0.2%) 62,883 (-0.6%) 72,256 (+0.0%) 58,693 (+0.7%) 1.384 (-0.1%)
sharding-w8 157,802 (-2.1%) 46.54 (+1.8%) 67,078 (+2.1%) 56,082 (+0.0%) 53,024 (+1.3%) 0.1464 (+2.4%)
Counters per txn
suite frontend stall l1i refill backend stall
pooler 11,981 (-1.7% ± 2.5%) 3,034 (-0.5% ± 0.6%) 2,840 (+2.5% ± 0.9%)
lb 12,918 (-0.1% ± 2.5%) 3,130 (+0.0% ± 0.5%) 3,084 (+2.5% ± 1.3%)
sharding-w2 34,636 (-1.5%) 5,122 (-0.1%) 6,731 (+2.7%)
sharding-w8 37,950 (+2.9%) 5,012 (+1.0%) 9,456 (+1.8%)

Microbench: all 135 measures within bounds.

  • extended_cached: 15 of 15 benches faster, median -5.4% ± 0.4%
  • extended_cold: 15 of 15 benches faster, median -3.1% ± 0.5%
  • simple_cold: 15 of 15 benches faster, median -2.1% ± 0.5%
lb flamegraph vs 17cc5b6

lb

Open interactive for hover, zoom and search.

lb removed

Open interactive.

microbench flamegraph vs 17cc5b6

microbench

Open interactive for hover, zoom and search.

microbench removed

Open interactive.

pooler flamegraph vs 17cc5b6

pooler

Open interactive for hover, zoom and search.

pooler removed

Open interactive.

sharding-w2 flamegraph vs 17cc5b6

sharding-w2

Open interactive for hover, zoom and search.

sharding-w2 removed

Open interactive.

sharding-w8 flamegraph vs 17cc5b6

sharding-w8

Open interactive for hover, zoom and search.

sharding-w8 removed

Open interactive.

Logs

lb, microbench, pooler, sharding-w2, sharding-w8, verdict.json

Compared e24d4f8 with 17cc5b6.

@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

ProjectPgDog
Branchmurex-single-table-move
TestbedIntel v1

🚨 1 Alert

BenchmarkMeasure
Units
ViewBenchmark Result
(Result Δ%)
Upper Boundary
(Limit %)
lb-v3cpu-per-txn
Measure (units)
📈 plot
🚷 threshold
🚨 alert (🔔)
42.17 units
(+1.34%)Baseline: 41.61 units
42.03 units
(100.34%)

Click to view all benchmark results
BenchmarkThroughputBenchmark Result
operations / second (ops/s) x 1e3
(Result Δ%)
Lower Boundary
operations / second (ops/s) x 1e3
(Limit %)
cpu-per-txnBenchmark Result
Measure (units)
(Result Δ%)
Upper Boundary
Measure (units)
(Limit %)
lb-v3📈 view plot
🚷 view threshold
15.99 ops/s x 1e3
(-0.00%)Baseline: 15.99 ops/s x 1e3
15.83 ops/s x 1e3
(99.00%)
📈 view plot
🚷 view threshold
🚨 view alert (🔔)
42.17 units
(+1.34%)Baseline: 41.61 units
42.03 units
(100.34%)

🐰 View full continuous benchmarking report in Bencher

@murex971
murex971 requested a review from levkk October 29, 2026 12:34

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Logical] Expose copy/logical replication for a single table

1 participant