Skip to content

Commit 9d8c743

Browse files
committed
Document compare-bloat.sh in README and AGENTS.md
1 parent f40024f commit 9d8c743

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

pgcopydb-helpers/README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,20 @@ When `check-cdc-status.sh` reports **"CDC IS CAUGHT UP"** (apply backlog < 100 M
195195

196196
6. **Switch** your application to the PlanetScale target.
197197

198-
### 5. Clean Up
198+
### 5. Post-Migration (Optional)
199+
200+
These steps are optional and can be run after the migration is complete and traffic has been switched.
201+
202+
**Compare bloat reduction** between source and target to see how much space was reclaimed by the fresh copy. This breaks down heap, TOAST, and index sizes per table and reports overall reduction:
203+
204+
```bash
205+
~/compare-bloat.sh # tables > 100 MB (default)
206+
~/compare-bloat.sh --min-size-mb 500 # only tables > 500 MB
207+
```
208+
209+
The script uses catalog queries only — no table scans, no writes, no locks — and is safe to run against production databases.
210+
211+
### 6. Clean Up
199212

200213
After the migration is complete (or abandoned), clean up replication artifacts:
201214

0 commit comments

Comments
 (0)